Introduction
PHP Manual
PHP Manual»Yaf»Yaf_Route_Simple

The Yaf_Route_Simple class

(Yaf >=1.0.0)

Yaf_Route_Simple resolves the route info from the query string. All you need to do is tell Yaf_Route_Simple which key in $_GET is the module, which key is the controller, and which key is the action.

Yaf_Route_Simple::route() claims the request (returns true) as soon as at least one of those keys is present in the query string, so routes registered after it in the stack will not be tried for such a request. It only passes (returns false) when none of the configured keys appear.

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

module

action

Table of Contents

To Top