PHP Class phprs\RouterWithCache

由于Router初始化时并不会创建API实例, 而是在API被调用时才创建, 所以缓存不会保存 API实例, 此特性有助于简化API的设计, API会在每个请求中重新初始化
Author: caoym
Mostra file Open project: caoym/phprs-restful

Public Methods

Method Description
__construct ( ) : void
__invoke ( Request $request = null, Response &$respond = null ) : mixed 调用路由规则匹配的api

Method Details

__construct() public method

public __construct ( ) : void
return void

__invoke() public method

调用路由规则匹配的api
public __invoke ( Request $request = null, Response &$respond = null ) : mixed
$request Request
$respond Response
return mixed