src/Bedrock/Http/Application.php
public function createRoute(?string $method, string $path, $handlers): Route
    {
        if ($handlers instanceof \Peak\Blueprint\Http\Stack) {
            return new Route($method, $path, $handlers);
        }
        if (!is_array($handlers)) {
            $handlers = [$handlers];
        }
        return new Route($method, $path, new Stack($handlers, $this->getHandlerResolver()));
    }
public function createRoute(?string $method, string $path, $handlers): Route
    {
        if ($handlers instanceof \Peak\Blueprint\Http\Stack) {
            return new Route($method, $path, $handlers);
        }
        if (!is_array($handlers)) {
            $handlers = [$handlers];
        }
        return new Route($method, $path, new Stack($handlers, $this->getHandlerResolver()));
    }
public function createRoute ( ? string $ method , string $ path , $ handlers ) : Route { if ( $ handlers instanceof \ Peak \ Blueprint \ Http \ Stack ) { return new Route ( $ method , $ path , $ handlers ) ; } if ( ! is_array ( $ handlers ) ) { $ handlers = [ $ handlers ] ; } return new Route ( $ method , $ path , new Stack ( $ handlers , $ this -> getHandlerResolver ( ) ) ) ; }
Create a new route
@param null|string $method
@param string $path
@param mixed $handlers
@return Route
Create a new route