本文整理匯總了PHP中ezcBase::setPackageDir方法的典型用法代碼示例。如果您正苦於以下問題:PHP ezcBase::setPackageDir方法的具體用法?PHP ezcBase::setPackageDir怎麽用?PHP ezcBase::setPackageDir使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ezcBase
的用法示例。
在下文中一共展示了ezcBase::setPackageDir方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getRepositoryDirectories
/**
* Return the list of directories that contain class repositories.
*
* The path to the eZ components directory is always included in the result
* array. Each element in the returned array has the format of:
* packageDirectory => ezcBaseRepositoryDirectory
*
* @return array(string=>ezcBaseRepositoryDirectory)
*/
public static function getRepositoryDirectories()
{
$autoloadDirs = array();
ezcBase::setPackageDir();
$repositoryDir = self::$currentWorkingDirectory ? self::$currentWorkingDirectory : realpath(dirname(__FILE__) . '/../../');
$autoloadDirs['ezc'] = new ezcBaseRepositoryDirectory(ezcBaseRepositoryDirectory::TYPE_INTERNAL, $repositoryDir, $repositoryDir . "/autoload");
foreach (ezcBase::$repositoryDirs as $extraDirKey => $extraDirArray) {
$repositoryDirectory = new ezcBaseRepositoryDirectory(ezcBaseRepositoryDirectory::TYPE_EXTERNAL, realpath($extraDirArray['basePath']), realpath($extraDirArray['autoloadDirPath']));
$autoloadDirs[$extraDirKey] = $repositoryDirectory;
}
return $autoloadDirs;
}