The Yaf_Route_Simple class

(Yaf >=1.0.0)

Introduction

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 synopsis

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
}

Properties

controller

module

action

Table of Contents

add a note

User Contributed Notes

There are no user contributed notes for this page.