// Matcher::match([Host $host [, string $baseQuery [, string HttpMethod]]) $host = new Host(); $response = new Response($matcher->match($host)); // Class Ignaszak\Router\Host([string $baseQuery]) // provides current request and http method // $baseQuery argument defines folder via site is avilable: // http://fullSite.com/Adress => $baseQuery = /Adress (without slash on end) // It is possible to define custom request and http method: // $matcher->match(null, '/customRequest', 'GET'); // Display response // Display matched params echo 'Routes:<pre>'; print_r($response->all()); echo '</pre>'; // Get concrete param echo $response->get('token'); // Get route name echo 'Route name: '; echo $response->name(); echo '<br />'; // Get route group echo 'Route group: '; echo $response->group(); echo '<br />'; // Get route controller echo 'Controller: '; echo $response->controller(); echo '<br />'; // Get attachment $attachment = $response->attachment(); $attachment();