mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 21:19:58 +09:00
Update composer dependencies
This commit is contained in:
34
vendor/symfony/routing/Annotation/Route.php
vendored
34
vendor/symfony/routing/Annotation/Route.php
vendored
@@ -22,15 +22,18 @@ namespace Symfony\Component\Routing\Annotation;
|
||||
class Route
|
||||
{
|
||||
private $path;
|
||||
private $localizedPaths = array();
|
||||
private $localizedPaths = [];
|
||||
private $name;
|
||||
private $requirements = array();
|
||||
private $options = array();
|
||||
private $defaults = array();
|
||||
private $requirements = [];
|
||||
private $options = [];
|
||||
private $defaults = [];
|
||||
private $host;
|
||||
private $methods = array();
|
||||
private $schemes = array();
|
||||
private $methods = [];
|
||||
private $schemes = [];
|
||||
private $condition;
|
||||
private $locale;
|
||||
private $format;
|
||||
private $utf8;
|
||||
|
||||
/**
|
||||
* @param array $data An array of key/value parameters
|
||||
@@ -53,6 +56,21 @@ class Route
|
||||
unset($data['path']);
|
||||
}
|
||||
|
||||
if (isset($data['locale'])) {
|
||||
$data['defaults']['_locale'] = $data['locale'];
|
||||
unset($data['locale']);
|
||||
}
|
||||
|
||||
if (isset($data['format'])) {
|
||||
$data['defaults']['_format'] = $data['format'];
|
||||
unset($data['format']);
|
||||
}
|
||||
|
||||
if (isset($data['utf8'])) {
|
||||
$data['options']['utf8'] = filter_var($data['utf8'], FILTER_VALIDATE_BOOLEAN) ?: false;
|
||||
unset($data['utf8']);
|
||||
}
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
$method = 'set'.str_replace('_', '', $key);
|
||||
if (!method_exists($this, $method)) {
|
||||
@@ -134,7 +152,7 @@ class Route
|
||||
|
||||
public function setSchemes($schemes)
|
||||
{
|
||||
$this->schemes = \is_array($schemes) ? $schemes : array($schemes);
|
||||
$this->schemes = \is_array($schemes) ? $schemes : [$schemes];
|
||||
}
|
||||
|
||||
public function getSchemes()
|
||||
@@ -144,7 +162,7 @@ class Route
|
||||
|
||||
public function setMethods($methods)
|
||||
{
|
||||
$this->methods = \is_array($methods) ? $methods : array($methods);
|
||||
$this->methods = \is_array($methods) ? $methods : [$methods];
|
||||
}
|
||||
|
||||
public function getMethods()
|
||||
|
||||
Reference in New Issue
Block a user