lithium\net\http\Router::_prepareParams()
Prepares URL parameters for matching. Detects and Passes through un-routed URL strings, leaving them untouched.
Will not attempt to parse strings as shorthand parameters but instead interpret them as normal, non-routed URLs when they are prefixed with a known scheme.
Parameters
-
array|string
$url
An array of parameters, shorthand parameter string or URL string.
-
\lithium\action\Request
$context
-
array
$options
Returns
array|stringDepending on the type of $url either a string or an array.
Source
protected static function _prepareParams($url, $context, array $options) {
if (is_string($url)) {
if (strpos($url, '://')) {
return $url;
}
foreach (array('#', '//', 'mailto', 'javascript') as $prefix) {
if (strpos($url, $prefix) === 0) {
return $url;
}
}
if (is_string($url = static::_parseString($url, $context, $options))) {
return static::_prefix($url, $context, $options);
}
}
$isArray = (
isset($url[0]) &&
is_array($params = static::_parseString($url[0], $context, $options))
);
if ($isArray) {
unset($url[0]);
$url = $params + $url;
}
return static::_persist(static::_parseController($url), $context);
}