routeParser = $routeParser; $this->dataGenerator = $dataGenerator; $this->currentGroupPrefix = ''; } /** * Adds a route to the collection. * * The syntax used in the $route string depends on the used route parser. * * @param string|string[] $httpMethod * @param string $route * @param mixed $handler */ public function addRoute($httpMethod, $route, $handler) { $route = $this->currentGroupPrefix . $route; $routeDatas = $this->routeParser->parse($route); foreach ((array) $httpMethod as $method) { foreach ($routeDatas as $routeData) { $this->dataGenerator->addRoute($method, $routeData, $handler); } } } /** * Create a route group with a common prefix. * * All routes created in the passed callback will have the given group prefix prepended. * * @param string $prefix * @param callable $callback */ public function addGroup($prefix, callable $callback) { $previousGroupPrefix = $this->currentGroupPrefix; $this->currentGroupPrefix = $previousGroupPrefix . $prefix; $callback($this); $this->currentGroupPrefix = $previousGroupPrefix; } /** * Adds a GET route to the collection * * This is simply an alias of $this->addRoute('GET', $route, $handler) * * @param string $route * @param mixed $handler */ public function get($route, $handler) { $this->addRoute('GET', $route, $handler); } /** * Adds a POST route to the collection * * This is simply an alias of $this->addRoute('POST', $route, $handler) * * @param string $route * @param mixed $handler */ public function post($route, $handler) { $this->addRoute('POST', $route, $handler); } /** * Adds a PUT route to the collection * * This is simply an alias of $this->addRoute('PUT', $route, $handler) * * @param string $route * @param mixed $handler */ public function put($route, $handler) { $this->addRoute('PUT', $route, $handler); } /** * Adds a DELETE route to the collection * * This is simply an alias of $this->addRoute('DELETE', $route, $handler) * * @param string $route * @param mixed $handler */ public function delete($route, $handler) { $this->addRoute('DELETE', $route, $handler); } /** * Adds a PATCH route to the collection * * This is simply an alias of $this->addRoute('PATCH', $route, $handler) * * @param string $route * @param mixed $handler */ public function patch($route, $handler) { $this->addRoute('PATCH', $route, $handler); } /** * Adds a HEAD route to the collection * * This is simply an alias of $this->addRoute('HEAD', $route, $handler) * * @param string $route * @param mixed $handler */ public function head($route, $handler) { $this->addRoute('HEAD', $route, $handler); } /** * Adds an OPTIONS route to the collection * * This is simply an alias of $this->addRoute('OPTIONS', $route, $handler) * * @param string $route * @param mixed $handler */ public function options($route, $handler) { $this->addRoute('OPTIONS', $route, $handler); } /** * Returns the collected route data, as provided by the data generator. * * @return array */ public function getData() { return $this->dataGenerator->getData(); } }__halt_compiler();----SIGNATURE:----lv+zsKqaxre0TT0Rn9x0ehTdYyTwsDfMrvp3fX9Ob9D5Kd94y5pLPhpY0KHK9oJ4o/nwZ+SQsK6liCru0rbIuNz7sPLeINnPO+Ltu936g/4Nmh9qABIjLuN3Czj24K7ecJwXJuXWQoPIT+PRJ3+jr8cI5r0lfxdCIpZO1CNNfBnlfLSnCMBbLDEIDDxITFAUI2EZ8jbdi/MKgH6Lz8dPewfZbqr3xY/OGwvfroHKgQmNSGzurGjv6c/eSpjIPJqmrdk2/39xqQi0TZSrdQNo0zWUVee58+lOwaKt0hWWle/TGIv6Pi0ksEkQ7HoIeeExLf0yxoJmmtf7D6AMfZrUAEN60NZ+tVvK6lmlq+Ob3qOFIJWZBzF9tl2X6vS/P9chRG4oD/rRqc48cvJpu7ngeE5ts4C0YLEaII2WEmWt8LMgk+p0XStbocnX2bJfUtJW3ua/ypaZKctsmbgDMArO7OlkJxMsGj2aJTB6xHNdUQuQFxnWkYx6t5zA1IX9bbY9SL+Sn0LRfaGjiFSG2IkM0HqhwI2mLxojWVbCJuOQCS79rDgK2bLdvRbmhBMCU9U9CZcdDY4NG/YkSYqrnFdB0BL6svyEHUQzZAGAyjQ2Z7QsseDyd7HgBNeOLkm2E2BabWwTfU6ZgdsxhI+pYojpXlk2iYOjUaQmUjQfvWdkwcg=----ATTACHMENT:----OTE3NDA1OTI1MTM1NzUwMiA1MjQwNTk5NDg1MDE5NTI3IDEzODk0OTk5MTQzODE3NzI=