/** * 分发运行 * @param array $plugins */ public function execute($plugins) { $this->_router = Leb_Router::getInstance(); $this->_router->run($plugins); // 手动运行Router对象以获得Request对象 // 手动设计运行对象 $this->setRunner($this->_router); $this->setAppName($this->_router->getApp()); $this->setControllerName($this->_router->getController()); $this->setActionName($this->_router->getAction()); return $this; }
/** * 设置本对象需要的请求对象 * * @param Leb_Request $plugins */ public function execute($plugins) { return self::$_engine->execute($plugins); }
/** * 生成URL * * @param string $action 动作名 * @param string $controller 控制器名 ,可选,默认与当前控制器同名 * @param string $application 模块名 ,可选,默认与当前模块名相同 * @param array $params 传递的参数,参数将以GET方法传递 * @return string */ function build_url($action, $controller = '', $application = '', $param = array()) { $router = Leb_Router::getInstance(); return $router->buildUrl($action, $controller, $application, $param); }