public function matchCurrentRequest()
    {
        $requestMethod = (
            isset($_POST['_method'])
            && ($_method = strtoupper($_POST['_method']))
            && in_array($_method, array(RequestMethodInterface::METHOD_PUT, RequestMethodInterface::METHOD_DELETE), true)
        ) ? $_method : $_SERVER['REQUEST_METHOD'];

        $requestUrl = $_SERVER['REQUEST_URI'];

        // strip GET variables from URL
        if (($pos = strpos($requestUrl, '?')) !== false) {
            $requestUrl = substr($requestUrl, 0, $pos);
        }

        return $this->match($requestUrl, $requestMethod);
    }
public function matchCurrentRequest()
    {
        $requestMethod = (
            isset($_POST['_method'])
            && ($_method = strtoupper($_POST['_method']))
            && in_array($_method, array(RequestMethodInterface::METHOD_PUT, RequestMethodInterface::METHOD_DELETE), true)
        ) ? $_method : $_SERVER['REQUEST_METHOD'];

        $requestUrl = $_SERVER['REQUEST_URI'];

        // strip GET variables from URL
        if (($pos = strpos($requestUrl, '?')) !== false) {
            $requestUrl = substr($requestUrl, 0, $pos);
        }

        return $this->match($requestUrl, $requestMethod);
    }
public function matchCurrentRequest ( ) { $ requestMethod = ( isset ( $ _POST [ '_method' ] ) && ( $ _method = strtoupper ( $ _POST [ '_method' ] ) ) && in_array ( $ _method , array ( RequestMethodInterface :: METHOD_PUT , RequestMethodInterface :: METHOD_DELETE ) , true ) ) ? $ _method : $ _SERVER [ 'REQUEST_METHOD' ] ; $ requestUrl = $ _SERVER [ 'REQUEST_URI' ] ; // strip GET variables from URL if ( ( $ pos = strpos ( $ requestUrl , '?' ) ) !== false ) { $ requestUrl = substr ( $ requestUrl , 0 , $ pos ) ; } return $ this -> match ( $ requestUrl , $ requestMethod ) ; }
Matches the current request against mapped routes
Matches the current request against mapped routes