Changeset 1731

Show
Ignore:
Timestamp:
07/22/08 19:59:35 (2 months ago)
Author:
richi
Message:

config: added getRootPath for possibility of using relative paths in project(s)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework/trunk/projects/dist/config/php/config-dist.php

    r1654 r1731  
    55class stubConfig 
    66{ 
     7    /** 
     8     * path to root of project 
     9     * 
     10     * @var  string 
     11     */ 
     12    private static $rootPath   = null; 
    713    /** 
    814     * path to libary files 
     
    4753     */ 
    4854    private static $commonPath = null; 
     55 
     56    /** 
     57     * Returns the root path of the project. 
     58     * 
     59     * By default its /path/to/stubbles/. 
     60     * 
     61     * @return  string 
     62     */ 
     63    public static function getRootPath() 
     64    { 
     65        if (null == self::$rootPath) { 
     66            self::$rootPath = realpath(dirname(__FILE__) . '/../../../../'); 
     67        } 
     68 
     69        return self::$rootPath; 
     70    } 
    4971 
    5072    /** 
  • framework/trunk/projects/dist/config/php/config.php

    r1654 r1731  
    55class stubConfig 
    66{ 
     7    /** 
     8     * path to root of project 
     9     * 
     10     * @var  string 
     11     */ 
     12    private static $rootPath   = null; 
    713    /** 
    814     * path to libary files 
     
    4753     */ 
    4854    private static $commonPath = null; 
     55 
     56    /** 
     57     * Returns the root path of the project. 
     58     * 
     59     * By default its /path/to/stubbles/. 
     60     * 
     61     * @return  string 
     62     */ 
     63    public static function getRootPath() 
     64    { 
     65        if (null == self::$rootPath) { 
     66            self::$rootPath = realpath(dirname(__FILE__) . '/../../../../'); 
     67        } 
     68 
     69        return self::$rootPath; 
     70    } 
    4971 
    5072    /**