updated-packages
This commit is contained in:
32
vendor/symfony/routing/CompiledRoute.php
vendored
32
vendor/symfony/routing/CompiledRoute.php
vendored
@@ -37,7 +37,7 @@ class CompiledRoute implements \Serializable
|
||||
* @param array $hostVariables An array of host variables
|
||||
* @param array $variables An array of variables (variables defined in the path and in the host patterns)
|
||||
*/
|
||||
public function __construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, string $hostRegex = null, array $hostTokens = array(), array $hostVariables = array(), array $variables = array())
|
||||
public function __construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, string $hostRegex = null, array $hostTokens = [], array $hostVariables = [], array $variables = [])
|
||||
{
|
||||
$this->staticPrefix = $staticPrefix;
|
||||
$this->regex = $regex;
|
||||
@@ -49,12 +49,9 @@ class CompiledRoute implements \Serializable
|
||||
$this->variables = $variables;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function serialize()
|
||||
public function __serialize(): array
|
||||
{
|
||||
return serialize(array(
|
||||
return [
|
||||
'vars' => $this->variables,
|
||||
'path_prefix' => $this->staticPrefix,
|
||||
'path_regex' => $this->regex,
|
||||
@@ -63,16 +60,22 @@ class CompiledRoute implements \Serializable
|
||||
'host_regex' => $this->hostRegex,
|
||||
'host_tokens' => $this->hostTokens,
|
||||
'host_vars' => $this->hostVariables,
|
||||
));
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return string
|
||||
*
|
||||
* @internal since Symfony 4.3
|
||||
* @final since Symfony 4.3
|
||||
*/
|
||||
public function unserialize($serialized)
|
||||
public function serialize()
|
||||
{
|
||||
$data = unserialize($serialized, array('allowed_classes' => false));
|
||||
return serialize($this->__serialize());
|
||||
}
|
||||
|
||||
public function __unserialize(array $data): void
|
||||
{
|
||||
$this->variables = $data['vars'];
|
||||
$this->staticPrefix = $data['path_prefix'];
|
||||
$this->regex = $data['path_regex'];
|
||||
@@ -83,6 +86,15 @@ class CompiledRoute implements \Serializable
|
||||
$this->hostVariables = $data['host_vars'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal since Symfony 4.3
|
||||
* @final since Symfony 4.3
|
||||
*/
|
||||
public function unserialize($serialized)
|
||||
{
|
||||
$this->__unserialize(unserialize($serialized, ['allowed_classes' => false]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the static prefix.
|
||||
*
|
||||
|
Reference in New Issue
Block a user