本文整理匯總了PHP中url::modules方法的典型用法代碼示例。如果您正苦於以下問題:PHP url::modules方法的具體用法?PHP url::modules怎麽用?PHP url::modules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類url
的用法示例。
在下文中一共展示了url::modules方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getUnInstalled
public function getUnInstalled()
{
$installed = (array) $this->getInstalled();
$folders = dir::folders(ZPATH_MODULES, '.', false);
$folders = array_diff($folders, array_keys($installed));
$modules = array();
foreach ($folders as $folder) {
$modulePath = ZPATH_MODULES . DS . $folder;
$moduleUrl = url::modules() . '/' . $folder;
$moduleFile = $modulePath . DS . 'module.php';
if (file::exists($moduleFile)) {
$m = (include $moduleFile);
$m['path'] = '$modules/' . $folder;
$m['url'] = '$modules/' . $folder;
if (!isset($m['icon'])) {
if (!file::exists($modulePath . '/icon.png')) {
$m['icon'] = url::theme() . '/image/skin/none.png';
} else {
$m['icon'] = $moduleUrl . '/icon.png';
}
}
$modules[$m['id']] = $m;
}
}
return $modules;
}
示例2: notInstalled
public function notInstalled()
{
$datalist = (array) $this->datalist();
$folders = dir::folders(ZOTOP_MODULES, '.', false);
$folders = array_diff($folders, array_keys($datalist));
$modules = array();
foreach ($folders as $folder) {
$modulePath = ZOTOP_MODULES . DS . $folder;
$moduleUrl = url::modules() . '/' . $folder;
$moduleFile = $modulePath . DS . 'module.php';
if (file::exists($moduleFile)) {
$m = (include $moduleFile);
if (!isset($m['icon'])) {
$m['icon'] = $moduleUrl . '/icon.gif';
if (!file::exists($m['icon'])) {
$m['icon'] = url::theme() . '/image/icon/module.gif';
}
}
$modules[$m['id']] = $m;
}
}
return $modules;
}
示例3: decode
public static function decode($url)
{
$url = strtr($url, array('$root' => url::root(), '$system' => url::system(), '$theme' => url::theme(), '$modules' => url::modules(), '$this' => url::controller(), '$common' => url::common()));
return $url;
}