Drest\Mapping\RouteMetaData::getRouteConditions PHP Method

getRouteConditions() public method

Get the route conditions
public getRouteConditions ( ) : array | null
return array | null
    public function getRouteConditions()
    {
        return $this->route_conditions;
    }

Usage Example

Example #1
0
 /**
  * Are the given route conditions matching
  * @return bool
  */
 protected function routeConditionsAreValid()
 {
     foreach ($this->routeMetaData->getRouteConditions() as $key => $condition) {
         if (!preg_match('/^' . $condition . '$/', $this->route_params[$key])) {
             $this->param_names_path = $this->route_params = $this->unmapped_route_params = [];
             return false;
         }
     }
     return true;
 }