UrlToQueryItem.php
private function parseRewriteRules( Array $rewrite ) {
        $this->error = '404';
        $request_match = $this->request;
        if ( empty( $request_match ) && isset( $rewrite['$'] ) ) {
            $this->matched_rule = '$';
            $matches = [ '' ];
            $query = $rewrite['$'];
        } else {
            foreach ( (array) $rewrite as $match => $query ) {
                $matches = $this->parseRewriteRule( $match, $query );
                if ( ! is_null( $this->matched_rule ) ) {
                    return [ $matches, $query ];
                }
            }
        }
        return [ $matches, $query ];
    }
private function parseRewriteRules( Array $rewrite ) {
        $this->error = '404';
        $request_match = $this->request;
        if ( empty( $request_match ) && isset( $rewrite['$'] ) ) {
            $this->matched_rule = '$';
            $matches = [ '' ];
            $query = $rewrite['$'];
        } else {
            foreach ( (array) $rewrite as $match => $query ) {
                $matches = $this->parseRewriteRule( $match, $query );
                if ( ! is_null( $this->matched_rule ) ) {
                    return [ $matches, $query ];
                }
            }
        }
        return [ $matches, $query ];
    }
private function parseRewriteRules ( Array $ rewrite ) { $ this -> error = '404' ; $ request_match = $ this -> request ; if ( empty ( $ request_match ) && isset ( $ rewrite [ '$' ] ) ) { $ this -> matched_rule = '$' ; $ matches = [ '' ] ; $ query = $ rewrite [ '$' ] ; } else { foreach ( ( array ) $ rewrite as $ match => $ query ) { $ matches = $ this -> parseRewriteRule ( $ match , $ query ) ; if ( ! is_null ( $ this -> matched_rule ) ) { return [ $ matches , $ query ] ; } } } return [ $ matches , $ query ] ; }
Loop throught registered rewrite rule and check them against the url to resolve.

@param array $rewrite
@return array
@uses \GM\UrlToQueryItem::parseRewriteRule()
Loop throught registered rewrite rule and check them against the url to resolve .