public function url($params = array())
	{
		if ($this->isStatic())
		{
			return $this->pattern;
		}

		$url = $this->pattern;

		foreach ($this->getSegments($url) as $segment)
		{
			$func = $segment['optional'] === true ? 'replaceOptional' : 'replaceRequired';
			$url = $this->{$func}($url, $segment['name'], $segment['token'], $params);
		}

		return $url;
	}
public function url($params = array())
	{
		if ($this->isStatic())
		{
			return $this->pattern;
		}

		$url = $this->pattern;

		foreach ($this->getSegments($url) as $segment)
		{
			$func = $segment['optional'] === true ? 'replaceOptional' : 'replaceRequired';
			$url = $this->{$func}($url, $segment['name'], $segment['token'], $params);
		}

		return $url;
	}
public function url ( $ params = array ( ) ) { if ( $ this -> isStatic ( ) ) { return $ this -> pattern ; } $ url = $ this -> pattern ; foreach ( $ this -> getSegments ( $ url ) as $ segment ) { $ func = $ segment [ 'optional' ] === true ? 'replaceOptional' : 'replaceRequired' ; $ url = $ this -> { $ func } ( $ url , $ segment [ 'name' ] , $ segment [ 'token' ] , $ params ) ; } return $ url ; }
A reverse routing helper.

@throws \UnexpectedValueException

@param  array  $params Parameters to set named options to
@return string
A reverse routing helper .