public function map($route, $name, $handler, array $methods = array('GET'))
    {
        foreach ($methods as $method) {
            if (null === $name) {
                $this->addRoute($method, $route, $handler);
            } else {
                $this->addNamedRoute($name, $method, $route, $handler);
            }
        }
    }
public function map($route, $name, $handler, array $methods = array('GET'))
    {
        foreach ($methods as $method) {
            if (null === $name) {
                $this->addRoute($method, $route, $handler);
            } else {
                $this->addNamedRoute($name, $method, $route, $handler);
            }
        }
    }
public function map ( $ route , $ name , $ handler , array $ methods = array ( 'GET' ) ) { foreach ( $ methods as $ method ) { if ( null === $ name ) { $ this -> addRoute ( $ method , $ route , $ handler ) ; } else { $ this -> addNamedRoute ( $ name , $ method , $ route , $ handler ) ; } } }
Map a handler to the given methods and route

@param string          $route   The route to match against
@param string          $name    The name of the route
@param string|callable $handler The handler for the route
@param array|string[]  $methods The HTTP methods for this handler
Map a handler to the given methods and route