private function getMatches(): array
    {
        // Extract URI of current query
        $uri = $this->getRequest()->getUri()->getPath();

        // Extract method of current request
        $method = $this->getRequest()->getMethod();
        $method = strtolower($method);

        // Foreach emulation
        return $this->checkMatches($uri, $method);
    }
private function getMatches(): array
    {
        // Extract URI of current query
        $uri = $this->getRequest()->getUri()->getPath();

        // Extract method of current request
        $method = $this->getRequest()->getMethod();
        $method = strtolower($method);

        // Foreach emulation
        return $this->checkMatches($uri, $method);
    }
private function getMatches ( ) : array { // Extract URI of current query $ uri = $ this -> getRequest ( ) -> getUri ( ) -> getPath ( ) ; // Extract method of current request $ method = $ this -> getRequest ( ) -> getMethod ( ) ; $ method = strtolower ( $ method ) ; // Foreach emulation return $ this -> checkMatches ( $ uri , $ method ) ; }
Find optimal route from array of routes by regexp and uri

@return  array
Find optimal route from array of routes by regexp and uri