本文整理汇总了PHP中ControllerFactory::Factory方法的典型用法代码示例。如果您正苦于以下问题:PHP ControllerFactory::Factory方法的具体用法?PHP ControllerFactory::Factory怎么用?PHP ControllerFactory::Factory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControllerFactory
的用法示例。
在下文中一共展示了ControllerFactory::Factory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setController
public function setController()
{
showtime('pre-controller-new');
$autoloader =& AutoLoader::Instance();
// controller
$controller = ControllerFactory::Factory($this->login_required, $autoloader->paths);
$this->controller = new $controller($this->module, $this->view);
$this->controller->setInjector($this);
$this->controller->setData($this->router->Dispatch());
// If session timed out on input form, get the saved form data
// after the user has logged back in
// see system::display for saving of form data
if (isset($_SESSION['data']) && $this->modules['module'] != 'login') {
$this->controller->setData($_SESSION['data']);
unset($_SESSION['data']);
}
$this->controller->setData($_GET);
$this->controller->setData($_POST);
}