kernel/private/rest/classes/routes/regexp.php
public function matches( ezcMvcRequest $request )
    {
        if ( $this->pregMatch( $request, $matches ) )
        {
            foreach ( $matches as $key => $match )
            {
                if ( is_numeric( $key ) )
                {
                    unset( $matches[$key] );
                }
            }
            if ( !isset( $this->protocolActionMap[$request->protocol] ) )
            {
                throw new ezpRouteMethodNotAllowedException( $this->getSupportedHTTPMethods() );
            }
            $request->variables = array_merge( $this->defaultValues, $request->variables, $matches );
            if ( $request->protocol === 'http-options' )
            {
                $request->variables['supported_http_methods'] = $this->getSupportedHTTPMethods();
            }
            return new ezcMvcRoutingInformation( $this->pattern, $this->controllerClassName, $this->protocolActionMap[$request->protocol] );
        }
        return null;
    }
public function matches( ezcMvcRequest $request )
    {
        if ( $this->pregMatch( $request, $matches ) )
        {
            foreach ( $matches as $key => $match )
            {
                if ( is_numeric( $key ) )
                {
                    unset( $matches[$key] );
                }
            }
            if ( !isset( $this->protocolActionMap[$request->protocol] ) )
            {
                throw new ezpRouteMethodNotAllowedException( $this->getSupportedHTTPMethods() );
            }
            $request->variables = array_merge( $this->defaultValues, $request->variables, $matches );
            if ( $request->protocol === 'http-options' )
            {
                $request->variables['supported_http_methods'] = $this->getSupportedHTTPMethods();
            }
            return new ezcMvcRoutingInformation( $this->pattern, $this->controllerClassName, $this->protocolActionMap[$request->protocol] );
        }
        return null;
    }
public function matches ( ezcMvcRequest $ request ) { if ( $ this -> pregMatch ( $ request , $ matches ) ) { foreach ( $ matches as $ key => $ match ) { if ( is_numeric ( $ key ) ) { unset ( $ matches [ $ key ] ) ; } } if ( ! isset ( $ this -> protocolActionMap [ $ request -> protocol ] ) ) { throw new ezpRouteMethodNotAllowedException ( $ this -> getSupportedHTTPMethods ( ) ) ; } $ request -> variables = array_merge ( $ this -> defaultValues , $ request -> variables , $ matches ) ; if ( $ request -> protocol === 'http-options' ) { $ request -> variables [ 'supported_http_methods' ] = $ this -> getSupportedHTTPMethods ( ) ; } return new ezcMvcRoutingInformation ( $ this -> pattern , $ this -> controllerClassName , $ this -> protocolActionMap [ $ request -> protocol ] ) ; } return null ; }
Evaluates the URI against this route and allowed protocols

The method first runs the match. If the regular expression matches, it
cleans up the variables to only include named parameters.  it then
creates an object containing routing information and returns it. If the
route's pattern did not match it returns null.

@param ezcMvcRequest $request
@return null|ezcMvcRoutingInformation
Evaluates the URI against this route and allowed protocols