Autarky\Routing\Route::setParams PHP Method

setParams() public method

When a match against the route has been confirmed, extract the parameters from the URI and pass them as an associative array to this method.
public setParams ( array $params )
$params array
    public function setParams(array $params)
    {
        $this->params = $params;
    }

Usage Example

示例#1
0
 protected function matchRoute(Route $route, array $params, Request $request)
 {
     $route->setParams($params);
     if ($this->eventDispatcher !== null) {
         $event = new Events\RouteMatchedEvent($request, $route);
         $this->eventDispatcher->dispatch('route.match', $event);
         $route = $event->getRoute();
     }
     return $route;
 }