本文整理汇总了PHP中router::get_url_property方法的典型用法代码示例。如果您正苦于以下问题:PHP router::get_url_property方法的具体用法?PHP router::get_url_property怎么用?PHP router::get_url_property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类router
的用法示例。
在下文中一共展示了router::get_url_property方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadController
public function loadController($controller_name)
{
router::set_controller($controller_name);
if (!class_exists($controller_name)) {
error::page($controller_name);
}
$controller = new $controller_name();
self::$controller = $controller;
if (method_exists($controller, '_route')) {
$controller->i_route();
}
if (router::get_controller() !== $controller_name) {
$this->controller_finder();
return;
}
if (method_exists($controller, 'config') || array_key_exists('config', $controller->Methods)) {
$controller->iconfig();
}
if (method_exists($controller, 'options')) {
$controller->ioptions();
}
if (count(router::get_url_property(-1)) > 0 && $controller->route_check_true === false) {
error::page('Unavailable');
}
$controller->i_corridor();
}
示例2: loadController
public function loadController()
{
/**
* find controller;
*/
$url_property = router::get_url_property(-1);
$myrep = router::get_repository_name();
if (!router::get_controller()) {
$controller_name = '\\' . $myrep . '\\' . router::get_class() . '\\' . router::get_method() . '\\controller';
$prv_class = router::get_class();
// var_dump($controller_name);
if (!class_exists($controller_name)) {
if ((!isset($url_property[1]) || $url_property[1] != router::get_method()) && router::get_method() != 'home') {
router::add_url_property(router::get_method());
}
$prv_method = router::get_method();
router::set_method('home');
$controller_name = '\\' . $myrep . '\\' . router::get_class() . '\\' . router::get_method() . '\\controller';
// var_dump(router::get_url_property(-1));
// var_dump($controller_name);
if (!class_exists($controller_name)) {
router::set_class($prv_class);
$controller_name = '\\' . $myrep . '\\' . router::get_class() . '\\controller';
// var_dump(router::get_url_property(-1));
// var_dump($controller_name);
if (!class_exists($controller_name)) {
if ((!isset($url_property[0]) || $url_property[0] != router::get_class()) && router::get_class() != 'home') {
router::add_url_property(router::get_class());
}
router::set_class('home');
$controller_name = '\\' . $myrep . '\\' . router::get_class() . '\\' . router::get_method() . '\\controller';
// var_dump(router::get_url_property(-1));
// var_dump($controller_name);
//
if (!class_exists($controller_name)) {
router::set_class('home');
$controller_name = '\\' . $myrep . '\\' . router::get_class() . '\\controller';
// var_dump(router::get_url_property(-1));
// $controller_name='\account\home\controller';
// var_dump($controller_name);
if (!class_exists($controller_name)) {
\lib\error::page("content not found");
}
}
}
}
}
} else {
$controller_name = router::get_controller();
}
router::set_controller($controller_name);
if (!class_exists($controller_name)) {
error::page($controller_name);
}
$controller = new $controller_name();
self::$controller = $controller;
// running template base module for homepage
if (\lib\router::get_storage('CMS') && $myrep == 'content' && method_exists($controller, 's_template_finder')) {
$controller->s_template_finder();
}
if (method_exists($controller, '_route')) {
$controller->_route();
}
if (router::get_controller() !== $controller_name) {
$this->loadController();
return;
}
if (method_exists($controller, 'config')) {
$controller->config();
}
if (method_exists($controller, 'options')) {
$controller->options();
}
if (count(router::get_url_property(-1)) > 0 && $controller->route_check_true === false) {
error::page('Unavailable');
}
$controller->_corridor();
}