略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Yaf_Route_Simple

2024-03-27

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

目录

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/class.yaf-route-simple.php

冷却塔厂家 广告
-- 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3