PHP 8.5.0 Beta 2 available for testing

Yaf_Route_Interface::route

(Yaf >=1.0.0)

Yaf_Route_Interface::routeRoute a request

Description

abstract public Yaf_Route_Interface::route(Yaf_Request_Abstract $request): bool

Yaf_Route_Interface::route() is the only method that a custom route should implement.

Note:

since of 2.3.0, there is another method should also be implemented, see Yaf_Route_Interface::assemble() .

if this method return true , then the route process will be end. otherwise, Yaf_Router will call next route in the route stack to route request.

This method would set the route result to the parameter request, by calling Yaf_Request_Abstract::setControllerName() , Yaf_Request_Abstract::setActionName() and Yaf_Request_Abstract::setModuleName() .

This method should also call Yaf_Request_Abstract::setRouted() to make the request routed at last.

Parameters

request

A Yaf_Request_Abstract instance.

Return Values

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /