/** * @param Route $route * @param string $uriPath * @return array */ public function getRoutePathParams(Route $route, $uriPath) { return RoutePathParser::search($route->getPath(), $this->prepareUriPath($uriPath)); }
/** * Check if the security credentials have the correct values for the route * @param Route $route * @param Route $credentials * @return boolean */ private function hasRouteSecurity(Route $route, SessionCredentials $credentials) { // Check the route security against the user roles and features $secure = $route->getSecure(); if (!empty($secure)) { foreach ($secure as $role) { if (!$credentials->hasRole($role)) { return false; } } } $features = $route->getFeature(); if (!empty($features)) { foreach ($features as $feature) { if (!$credentials->hasFeature($feature)) { return false; } } } return true; }