GET
GET
This interface describes how a route must be implemented in its basic implementation.
__invoke(\Psr\Http\Message\RequestInterface $request, \Psr\Http\Message\ResponseInterface $response, \Gishiki\Algorithms\Collections\GenericCollection $arguments, array $controllerArgs = array(), \Gishiki\Core\Application|null $app = null)
Execute the callback associated with the current route.
This function is called AUTOMATICALLY by the framework when the route can be used to fulfill the given request.
\Psr\Http\Message\RequestInterface | $request | a copy of the request made to the application |
\Psr\Http\Message\ResponseInterface | $response | the action must filled, and what will be returned to the client |
\Gishiki\Algorithms\Collections\GenericCollection | $arguments | a list of reversed URI parameters |
array | $controllerArgs | an array containing data created from the application initialization |
\Gishiki\Core\Application|null | $app | the current application instance |
matches(string $method, string $url, array $matchedExpr, array $matchedGet) : boolean
Check if the given URL matches the route URI.
Also fill GET and expressions parameters.
string | $method | the HTTP method used on the Request |
string | $url | the URL invoked |
array | $matchedExpr | will be filled with an associative array of paramName => urlValue |
array | $matchedGet | will be filled with an associative array of paramName => urlValue (reserved for get parameters) |
true if the given method and url matches this route