本文整理匯總了PHP中Hooks::load方法的典型用法代碼示例。如果您正苦於以下問題:PHP Hooks::load方法的具體用法?PHP Hooks::load怎麽用?PHP Hooks::load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Hooks
的用法示例。
在下文中一共展示了Hooks::load方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Exception
$zula->loadLib('ugmanager');
try {
$uid = $session->identify($_SESSION['auth']['key'], $_SESSION['auth']['for']);
if ($uid === false) {
throw new Exception();
}
} catch (Exception $e) {
$uid = $session->identify();
# Identify as guest for fail safe
}
}
define('_ACL_ENABLED', (bool) $config->get('acl/enable'));
if (Registry::has('sql')) {
$acl = $zula->loadLib('acl');
}
Hooks::load();
// Load the main router of the correct type
if ($input->has('get', 'ns') || function_exists('apache_get_modules') && !in_array('mod_rewrite', apache_get_modules())) {
$router = new Router();
} else {
$router = new Router($config->get('url_router/type'));
}
Registry::register('router', $router);
/**
* Microsoft Web App Gallery (Feature #221) support.
*/
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && file_exists('msInstall.php')) {
return require 'msInstall.php';
}
/**
* Configure the dispatcher, then get data from the parsed URL to load; if there is