PHP Conference Japan 2024

The Yaf_Route_Simple class

(Yaf >=1.0.0)

Giriş

Yaf_Route_Simple will match the query string, and find the route info.

all you need to do is tell Yaf_Route_Simple what key in the $_GET is module, what key is controller, and what key is action.

Yaf_Route_Simple::route() will always return true, so it is important put Yaf_Route_Simple in the front of the Route stack, otherwise all the other routes will not be called.

Sınıf Sözdizimi

class Yaf_Route_Simple implements Yaf_Route_Interface {
/* Özellikler */
protected $controller;
protected $module;
protected $action;
/* Yöntemler */
public __construct(string $module_name, string $controller_name, string $action_name)
public assemble(array $info, array $query = ?): string
public route(Yaf_Request_Abstract $request): bool
}

Özellikler

controller

module

action

İçindekiler

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top