本文整理汇总了PHP中ezcBase::packageDir方法的典型用法代码示例。如果您正苦于以下问题:PHP ezcBase::packageDir方法的具体用法?PHP ezcBase::packageDir怎么用?PHP ezcBase::packageDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ezcBase
的用法示例。
在下文中一共展示了ezcBase::packageDir方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setPackageDir
/**
* 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: setPackageDir
/**
* 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;
}
}