mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 13:09:53 +09:00
Update composer dependencies
This commit is contained in:
55
vendor/symfony/routing/Route.php
vendored
55
vendor/symfony/routing/Route.php
vendored
@@ -21,11 +21,11 @@ class Route implements \Serializable
|
||||
{
|
||||
private $path = '/';
|
||||
private $host = '';
|
||||
private $schemes = array();
|
||||
private $methods = array();
|
||||
private $defaults = array();
|
||||
private $requirements = array();
|
||||
private $options = array();
|
||||
private $schemes = [];
|
||||
private $methods = [];
|
||||
private $defaults = [];
|
||||
private $requirements = [];
|
||||
private $options = [];
|
||||
private $condition = '';
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ class Route implements \Serializable
|
||||
* @param string|string[] $methods A required HTTP method or an array of restricted methods
|
||||
* @param string $condition A condition that should evaluate to true for the route to match
|
||||
*/
|
||||
public function __construct(string $path, array $defaults = array(), array $requirements = array(), array $options = array(), ?string $host = '', $schemes = array(), $methods = array(), ?string $condition = '')
|
||||
public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', $schemes = [], $methods = [], ?string $condition = '')
|
||||
{
|
||||
$this->setPath($path);
|
||||
$this->addDefaults($defaults);
|
||||
@@ -62,12 +62,9 @@ class Route implements \Serializable
|
||||
$this->setCondition($condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function serialize()
|
||||
public function __serialize(): array
|
||||
{
|
||||
return serialize(array(
|
||||
return [
|
||||
'path' => $this->path,
|
||||
'host' => $this->host,
|
||||
'defaults' => $this->defaults,
|
||||
@@ -77,15 +74,20 @@ class Route implements \Serializable
|
||||
'methods' => $this->methods,
|
||||
'condition' => $this->condition,
|
||||
'compiled' => $this->compiled,
|
||||
));
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @internal since Symfony 4.3
|
||||
* @final since Symfony 4.3
|
||||
*/
|
||||
public function unserialize($serialized)
|
||||
public function serialize()
|
||||
{
|
||||
return serialize($this->__serialize());
|
||||
}
|
||||
|
||||
public function __unserialize(array $data): void
|
||||
{
|
||||
$data = unserialize($serialized);
|
||||
$this->path = $data['path'];
|
||||
$this->host = $data['host'];
|
||||
$this->defaults = $data['defaults'];
|
||||
@@ -102,6 +104,15 @@ class Route implements \Serializable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal since Symfony 4.3
|
||||
* @final since Symfony 4.3
|
||||
*/
|
||||
public function unserialize($serialized)
|
||||
{
|
||||
$this->__unserialize(unserialize($serialized));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pattern for the path.
|
||||
*
|
||||
@@ -262,9 +273,9 @@ class Route implements \Serializable
|
||||
*/
|
||||
public function setOptions(array $options)
|
||||
{
|
||||
$this->options = array(
|
||||
$this->options = [
|
||||
'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler',
|
||||
);
|
||||
];
|
||||
|
||||
return $this->addOptions($options);
|
||||
}
|
||||
@@ -327,7 +338,7 @@ class Route implements \Serializable
|
||||
*/
|
||||
public function hasOption($name)
|
||||
{
|
||||
return array_key_exists($name, $this->options);
|
||||
return \array_key_exists($name, $this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -351,7 +362,7 @@ class Route implements \Serializable
|
||||
*/
|
||||
public function setDefaults(array $defaults)
|
||||
{
|
||||
$this->defaults = array();
|
||||
$this->defaults = [];
|
||||
|
||||
return $this->addDefaults($defaults);
|
||||
}
|
||||
@@ -396,7 +407,7 @@ class Route implements \Serializable
|
||||
*/
|
||||
public function hasDefault($name)
|
||||
{
|
||||
return array_key_exists($name, $this->defaults);
|
||||
return \array_key_exists($name, $this->defaults);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -436,7 +447,7 @@ class Route implements \Serializable
|
||||
*/
|
||||
public function setRequirements(array $requirements)
|
||||
{
|
||||
$this->requirements = array();
|
||||
$this->requirements = [];
|
||||
|
||||
return $this->addRequirements($requirements);
|
||||
}
|
||||
@@ -481,7 +492,7 @@ class Route implements \Serializable
|
||||
*/
|
||||
public function hasRequirement($key)
|
||||
{
|
||||
return array_key_exists($key, $this->requirements);
|
||||
return \array_key_exists($key, $this->requirements);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user