public function match(array $options = []) {
		$defaults = ['action' => 'index', 'http:method' => 'GET'];
		$query = null;

		if (!$this->_config['continue']) {
			$options += $defaults;

			if (isset($options['?'])) {
				$query = $options['?'];
				$query = '?' . (is_array($query) ? http_build_query($query) : $query);
				unset($options['?']);
			}
		}
		if (!$options = $this->_matchMethod($options)) {
			return false;
		}
		if (!$options = $this->_matchKeys($options)) {
			return false;
		}
		foreach ($options as $key => $value) {
			if (isset($this->_config['formatters'][$key])) {
				$options[$key] = $this->_config['formatters'][$key]($value);
			}
		}
		foreach ($this->_subPatterns as $key => $pattern) {
			if (isset($options[$key]) && !preg_match("/^{$pattern}$/", $options[$key])) {
				return false;
			}
		}
		$defaults = $this->_defaults + $defaults;

		if ($this->_config['continue']) {
			return $this->_write(['args' => '{:args}'] + $options, $this->_defaults);
		}
		return $this->_write($options, $defaults + ['args' => '']) . $query;
	}
public function match(array $options = []) {
		$defaults = ['action' => 'index', 'http:method' => 'GET'];
		$query = null;

		if (!$this->_config['continue']) {
			$options += $defaults;

			if (isset($options['?'])) {
				$query = $options['?'];
				$query = '?' . (is_array($query) ? http_build_query($query) : $query);
				unset($options['?']);
			}
		}
		if (!$options = $this->_matchMethod($options)) {
			return false;
		}
		if (!$options = $this->_matchKeys($options)) {
			return false;
		}
		foreach ($options as $key => $value) {
			if (isset($this->_config['formatters'][$key])) {
				$options[$key] = $this->_config['formatters'][$key]($value);
			}
		}
		foreach ($this->_subPatterns as $key => $pattern) {
			if (isset($options[$key]) && !preg_match("/^{$pattern}$/", $options[$key])) {
				return false;
			}
		}
		$defaults = $this->_defaults + $defaults;

		if ($this->_config['continue']) {
			return $this->_write(['args' => '{:args}'] + $options, $this->_defaults);
		}
		return $this->_write($options, $defaults + ['args' => '']) . $query;
	}
public function match ( array $ options = [ ] ) { $ defaults = [ 'action' => 'index' , 'http:method' => 'GET' ] ; $ query = null ; if ( ! $ this -> _config [ 'continue' ] ) { $ options += $ defaults ; if ( isset ( $ options [ '?' ] ) ) { $ query = $ options [ '?' ] ; $ query = '?' . ( is_array ( $ query ) ? http_build_query ( $ query ) : $ query ) ; unset ( $ options [ '?' ] ) ; } } if ( ! $ options = $ this -> _matchMethod ( $ options ) ) { return false ; } if ( ! $ options = $ this -> _matchKeys ( $ options ) ) { return false ; } foreach ( $ options as $ key => $ value ) { if ( isset ( $ this -> _config [ 'formatters' ] [ $ key ] ) ) { $ options [ $ key ] = $ this -> _config [ 'formatters' ] [ $ key ] ( $ value ) ; } } foreach ( $ this -> _subPatterns as $ key => $ pattern ) { if ( isset ( $ options [ $ key ] ) && ! preg_match ( "/^{$pattern}$/" , $ options [ $ key ] ) ) { return false ; } } $ defaults = $ this -> _defaults + $ defaults ; if ( $ this -> _config [ 'continue' ] ) { return $ this -> _write ( [ 'args' => '{:args}' ] + $ options , $ this -> _defaults ) ; } return $ this -> _write ( $ options , $ defaults + [ 'args' => '' ] ) . $ query ; }
Matches a set of parameters against the route, and returns a URL string
if the route matches the parameters.

@param array $options An array of parameters.
@return string|boolean URL string on success, else `false` if the route didn't match.
Matches a set of parameters against the route and returns a URL string if the route matches the parameters .