Yaf_Route_Interface::route

Yaf_Route_Interface::route

(Yaf >=1.0.0)

Yaf_Route_Interface::routeroute a request

Description

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

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

© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/yaf-route-interface.route.php

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部