lithium\net\http\Router::_persist PHP Method

_persist() protected static method

For example: embed:lithium\tests\cases\net\http\RouterTest::testParameterPersistence(1-10)
See also: lithium\action\Request::$persist
protected static _persist ( array $url, Request $context ) : array
$url array The parameters that define the URL to be matched.
$context lithium\action\Request A request object, which contains a `$persist` property, which is an array of keys to be persisted in URLs between requests.
return array Returns the modified URL array.
    protected static function _persist($url, $context)
    {
        if (!$context || !isset($context->persist)) {
            return $url;
        }
        foreach ($context->persist as $key) {
            $url += array($key => $context->params[$key]);
            if ($url[$key] === null) {
                unset($url[$key]);
            }
        }
        return $url;
    }