src/Router/UrlGenerator.php
protected function generatePath($name, $params = []) {
		$result = '';
		$compiledRoute = $this->getCompiledRoute($name);

		if (is_string($compiledRoute)) {
			$result = $compiledRoute;
		} else if (is_array($compiledRoute)) {
			$chunks = $compiledRoute['chunks'];
			foreach ($params as $paramName => $value) {
				if (isset($compiledRoute['params'][$paramName])) {
					$index = $compiledRoute['params'][$paramName];
					$chunks[$index] = $value;
				}
			}
			$result = implode($chunks);
		}

		return $result;
	}
protected function generatePath($name, $params = []) {
		$result = '';
		$compiledRoute = $this->getCompiledRoute($name);

		if (is_string($compiledRoute)) {
			$result = $compiledRoute;
		} else if (is_array($compiledRoute)) {
			$chunks = $compiledRoute['chunks'];
			foreach ($params as $paramName => $value) {
				if (isset($compiledRoute['params'][$paramName])) {
					$index = $compiledRoute['params'][$paramName];
					$chunks[$index] = $value;
				}
			}
			$result = implode($chunks);
		}

		return $result;
	}
protected function generatePath ( $ name , $ params = [ ] ) { $ result = '' ; $ compiledRoute = $ this -> getCompiledRoute ( $ name ) ; if ( is_string ( $ compiledRoute ) ) { $ result = $ compiledRoute ; } else if ( is_array ( $ compiledRoute ) ) { $ chunks = $ compiledRoute [ 'chunks' ] ; foreach ( $ params as $ paramName => $ value ) { if ( isset ( $ compiledRoute [ 'params' ] [ $ paramName ] ) ) { $ index = $ compiledRoute [ 'params' ] [ $ paramName ] ; $ chunks [ $ index ] = $ value ; } } $ result = implode ( $ chunks ) ; } return $ result ; }
Generate path from compiled route.

@param string $name
@param array $params
@return string
Generate path from compiled route .