Created
October 13, 2012 13:09
-
-
Save tefra/3884585 to your computer and use it in GitHub Desktop.
Lithium Router skip persistent parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected static function _prepareParams($url, $context, array $options) { | |
if (is_string($url)) { | |
if (strpos($url, '://')) { | |
return $url; | |
} | |
foreach (array('#', '//', 'mailto') as $prefix) { | |
if (strpos($url, $prefix) === 0) { | |
return $url; | |
} | |
} | |
if (is_string($url = static::_parseString($url, $context))) { | |
return static::_prefix($url, $context, $options); | |
} | |
} | |
if (isset($url[0]) && is_array($params = static::_parseString($url[0], $context))) { | |
unset($url[0]); | |
$url = $params + $url; | |
} | |
if(isset($options['reset']) AND $options['reset']) | |
{ | |
return static::_parseController($url); | |
} | |
return static::_persist(static::_parseController($url), $context); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment