public function match(ServerRequestInterface $request, $path)
	{
	    if(isset($this->properties['method'])) {
	        if(!in_array(strtolower($request->getMethod()), $this->properties['method']))
	            return array(
	                'route' => false,
                    'parameter' => false,
                    'continue' => false
                );
        }

        if(isset($this->properties['path'])) {
            $result = $this->matchPath($path);

            if(!$result['matched'])
                return array(
                    'route' =>false,
                    'parameter' => $result['parameter'],
                    'continue' => $result['continue']
                );

            if($this->properties['validators']) {
                $flag = $this->matchValidators($request, $path, $result['parameter']);

                if($flag === false)
                    return array(
                        'route' => false,
                        'parameter' => false,
                        'continue' => false
                    );
            }

            return array(
                'route' => $this,
                'parameter' => $result['parameter'],
                'continue' => $result['continue']
            );
        }

        return array(
            'route'=>false,
            'parameter'=> array(),
            'continue'=> false
        );
	}
public function match(ServerRequestInterface $request, $path)
	{
	    if(isset($this->properties['method'])) {
	        if(!in_array(strtolower($request->getMethod()), $this->properties['method']))
	            return array(
	                'route' => false,
                    'parameter' => false,
                    'continue' => false
                );
        }

        if(isset($this->properties['path'])) {
            $result = $this->matchPath($path);

            if(!$result['matched'])
                return array(
                    'route' =>false,
                    'parameter' => $result['parameter'],
                    'continue' => $result['continue']
                );

            if($this->properties['validators']) {
                $flag = $this->matchValidators($request, $path, $result['parameter']);

                if($flag === false)
                    return array(
                        'route' => false,
                        'parameter' => false,
                        'continue' => false
                    );
            }

            return array(
                'route' => $this,
                'parameter' => $result['parameter'],
                'continue' => $result['continue']
            );
        }

        return array(
            'route'=>false,
            'parameter'=> array(),
            'continue'=> false
        );
	}
public function match ( ServerRequestInterface $ request , $ path ) { if ( isset ( $ this -> properties [ 'method' ] ) ) { if ( ! in_array ( strtolower ( $ request -> getMethod ( ) ) , $ this -> properties [ 'method' ] ) ) return array ( 'route' => false , 'parameter' => false , 'continue' => false ) ; } if ( isset ( $ this -> properties [ 'path' ] ) ) { $ result = $ this -> matchPath ( $ path ) ; if ( ! $ result [ 'matched' ] ) return array ( 'route' => false , 'parameter' => $ result [ 'parameter' ] , 'continue' => $ result [ 'continue' ] ) ; if ( $ this -> properties [ 'validators' ] ) { $ flag = $ this -> matchValidators ( $ request , $ path , $ result [ 'parameter' ] ) ; if ( $ flag === false ) return array ( 'route' => false , 'parameter' => false , 'continue' => false ) ; } return array ( 'route' => $ this , 'parameter' => $ result [ 'parameter' ] , 'continue' => $ result [ 'continue' ] ) ; } return array ( 'route' => false , 'parameter' => array ( ) , 'continue' => false ) ; }
Validate uri path against the request
@param ServerRequestInterface $request
@param string $path
@return array
Validate uri path against the request