芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/plugins/cloudflare/src/Router/RequestRouter.php
integrationContext = $integrationContext; $this->routerList = array(); } /** * @param APIInterface $client * @param $routes */ public function addRouter(APIInterface $client, $routes) { $router = new DefaultRestAPIRouter($this->integrationContext, $client, $routes); $this->routerList[$client->getAPIClientName()] = $router; } /** * @return array */ public function getRouterList() { return $this->routerList; } /** * @param $routerList */ public function setRouterList($routerList) { $this->routerList = $routerList; } /** * @param Request $request * * @return bool */ public function route(Request $request) { foreach ($this->getRouterList() as $router) { if ($router->getAPIClient()->shouldRouteRequest($request)) { return $router->route($request); } } return; } }