Пример #1
0
 /**
  * Returns the path to the autoload directory. The path depends on
  * the installation of the ezComponents. The SVN version has different
  * paths than the PEAR installed version. (For now).
  *
  * @return string
  */
 protected static function setPackageDir()
 {
     // Get the path to the components.
     $baseDir = dirname(__FILE__);
     switch (ezcBase::$libraryMode) {
         case "custom":
             ezcBase::$packageDir = self::$currentWorkingDirectory . '/';
             break;
         case "devel":
         case "tarball":
             ezcBase::$packageDir = $baseDir . "/../../";
             break;
         case "pear":
             ezcBase::$packageDir = $baseDir . "/../";
             break;
     }
 }
Пример #2
0
    /**
     * Figures out the base path of the eZ Components installation.
     *
     * It stores the path that it finds in a static member variable. The path
     * depends on the installation method of the eZ Components. The SVN version
     * has a different path than the PEAR installed version.
     */
    protected static function setPackageDir()
    {
        if ( ezcBase::$packageDir !== null )
        {
            return;
        }

        // Get the path to the components.
        $baseDir = dirname( __FILE__ );

        switch ( ezcBase::$libraryMode )
        {
            case "custom":
                ezcBase::$packageDir = self::$currentWorkingDirectory . '/';
                break;
            case "devel":
            case "tarball":
                // <hack author="ronan">
                //ezcBase::$packageDir = $baseDir. "/../../";
                ezcBase::$packageDir = $baseDir. "/../";
                // </hack>
                break;
            case "pear";
                ezcBase::$packageDir = $baseDir. "/../";
                break;
        }
    }