src/Panda/Routing/RouteCollection.php
public function getByMethod($method = null)
    {
        if (is_null($method)) {
            return $this->getRoutes();
        }

        // Filter routes by the given method
        return ArrayHelper::get($this->routes, $method, []);
    }
public function getByMethod($method = null)
    {
        if (is_null($method)) {
            return $this->getRoutes();
        }

        // Filter routes by the given method
        return ArrayHelper::get($this->routes, $method, []);
    }
public function getByMethod ( $ method = null ) { if ( is_null ( $ method ) ) { return $ this -> getRoutes ( ) ; } // Filter routes by the given method return ArrayHelper :: get ( $ this -> routes , $ method , [ ] ) ; }
Get all matched routes according to the given request method.

@param string|null $method

@return array
Get all matched routes according to the given request method .