golden hour
/home/godaofbq/cellsonic-usa.com/wp-content/plugins/cloudflare/src/Router
⬆️ Go Up
Upload
File/Folder
Size
Actions
DefaultRestAPIRouter.php
4.22 KB
Del
OK
RequestRouter.php
1.38 KB
Del
OK
RouterInterface.php
185 B
Del
OK
Edit: RequestRouter.php
<?php namespace Cloudflare\APO\Router; use Cloudflare\APO\API\Request; use Cloudflare\APO\API\APIInterface; use Cloudflare\APO\Integration\IntegrationInterface; class RequestRouter { protected $integrationContext; protected $routerList; /** * @param IntegrationInterface $integrationContext */ public function __construct(IntegrationInterface $integrationContext) { $this->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; } }
Save