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:----fU/to3TcAJQaqMyXSExd7oUodMXNVBZ/6iMRDBNLriJjS31jMD83iwxmSErdPQTqWrdw5VZuPy8NEgf/ALrDNyW501tlJBRJMlz0JMc9hNu1tj3Qvnm9ZSdDuliPjUleLRn7mBx72JbJK8BWa1DEnIryM+4DPSQDgGOiI95ZZ2s8w9vpmasr4PF81bii/LjEYHh7+xRww/DfzoCtTvwGhAF21zh140sbutCJ/zLaPMhboNMTcXVrtGGe66cspJ7/JsniysvRubmECLUrij507TeojQJYi2JD27ti6aEVoyQrqur/wJ904ey97OI+3KPIU7UxT1KB/eQM1TyZ7bLfpJ5T2RsMqdWwtRjPln/Jbah9rqD1vtPkms/5idhviPsgh3aishNu/BBQDdfpZgG3vwXC7rizXERL68rBZGq3rp6Md07ACH6c+6crm1ICQzKkH3C8WUQA/tvW0qswNCGrmcLjGP8MszVpm3nG6/N308z942HrGf3d4SBJjoUaSlG5wDx/c9j0pQiwjPdpPDuL0bctAguf2v3gGmmkg/f+h+yMkckcvkSKesknJ399WadIqjAa2SVZ7akoYgsFbUnaOUHWhMY+UWPM1kp8ve2r/nJRtRSB+6sEDoQ7OUjY0lzB+10vMBLJ6MxTJ6oN+4UcxyTg75csAsLmupB4X8scXKA=----ATTACHMENT:----NzU0MTY3NzA5Nzg1Mjk1MiAxNDkwMzE0NDcyOTAxMTUwIDQzMjY4MDg5NzExMzAwMTg=