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:----MMhqRKAIymPYoSRjTX4xUtXGw/0pXjpsChzTP/VGIrjgbNSZ3P8Pn837pgUMD61/PLhRKwTnbyXxt2X55aEojv/hX70GdzMRdYORnpglrJzdC98BmNbNqtX9Lkw9rIbvPQ/TjesToVLi0aUhcFFhjxjOqYzWi8XVP3V2TB8k42qp7DEZ5NzcoSUff0w0eyQnw39n8IVn/oJbZWVW9ggwKoF4yBGv8vUPQLGATRo1pEqdeJzQsDha5ZLRcDjUWjtSw+sWqLcLKRCOQ7BFbcA4H4mjswL5xjdFnz/9PN6ZYmA2wADhYmu7k7IoG4FPGlTfkPjXs0gcAsEbTi49I/qk3yYHG7ew2D7Jd6SQQrUYyAyLutTYD2KgjA79pfnQj+mEEH5aD7tiagUzvWoICWK/a79V2/A38IsMY1Ucp1U06TG6bur4FgM+SgSSuxbAVowgcTulfZvc5y5dSOddsscM40uRlGuYGGUWGQPMUExbNb2sDzcXEJPk+eZXgXLIIvGTE+LZuYlNNo8PuZJVV48zNCcS1djzFVfH+AbQDxMi1cnpjpt+Pz1+PJ1GYGw07Ez8fmzbDuVY32RDrWgrc7H/me+Go6zkFAb08vSMRwadr/EJ2usH4FvRUZLLSyLPPUe+vQnIr6Eds9ltAcSyIE85Y8/q8yhBDCk6LRxNnhnLwXo=----ATTACHMENT:----NzE0NTkxODMxMDAxMDQ2NyAxMzY1ODc4MDUzMjU4MTc3IDI0MDkyMjg5NTY3NjQ0OTE=