The Yaf_Route_Simple class

(Yaf >=1.0.0)

简介

Yaf_Route_Simple 会匹配请求中的query string,然后找到路由信息。

你需要做的只是告诉 Yaf_Route_Simple,在$_GET中哪个是Module,哪个是Controller,哪个是Action。

Yaf_Route_Simple::route() 总是会返回TRUE,所以把Yaf_Route_Simple放在路由堆栈前面是很重要的,否则其他所有的路由都可能不会被调用到。

类摘要

class Yaf_Route_Simple implements Yaf_Route_Interface {
/* 属性 */
protected $controller;
protected $module;
protected $action;
/* 方法 */
public assemble(array $info, array $query = ?): string
public__construct(string $module_name, string $controller_name, string $action_name)
public route(Yaf_Request_Abstract $request): bool
}

属性

controller

module

action

目录

7i24.Com