public function addRequirements(array $requirements)
    {
        if ($requirements) {
            foreach ($this->routes as $route) {
                $route->addRequirements($requirements);
            }
        }
    }
public function addRequirements(array $requirements)
    {
        if ($requirements) {
            foreach ($this->routes as $route) {
                $route->addRequirements($requirements);
            }
        }
    }
public function addRequirements ( array $ requirements ) { if ( $ requirements ) { foreach ( $ this -> routes as $ route ) { $ route -> addRequirements ( $ requirements ) ; } } }
Adds requirements to all routes.

An existing requirement under the same name in a route will be overridden.

@param array $requirements An array of requirements
Adds requirements to all routes .