Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
22
vendor/symfony/routing/Annotation/Route.php
vendored
22
vendor/symfony/routing/Annotation/Route.php
vendored
@@ -22,6 +22,7 @@ namespace Symfony\Component\Routing\Annotation;
|
||||
class Route
|
||||
{
|
||||
private $path;
|
||||
private $localizedPaths = array();
|
||||
private $name;
|
||||
private $requirements = array();
|
||||
private $options = array();
|
||||
@@ -38,11 +39,20 @@ class Route
|
||||
*/
|
||||
public function __construct(array $data)
|
||||
{
|
||||
if (isset($data['localized_paths'])) {
|
||||
throw new \BadMethodCallException(sprintf('Unknown property "localized_paths" on annotation "%s".', \get_class($this)));
|
||||
}
|
||||
|
||||
if (isset($data['value'])) {
|
||||
$data['path'] = $data['value'];
|
||||
$data[\is_array($data['value']) ? 'localized_paths' : 'path'] = $data['value'];
|
||||
unset($data['value']);
|
||||
}
|
||||
|
||||
if (isset($data['path']) && \is_array($data['path'])) {
|
||||
$data['localized_paths'] = $data['path'];
|
||||
unset($data['path']);
|
||||
}
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
$method = 'set'.str_replace('_', '', $key);
|
||||
if (!method_exists($this, $method)) {
|
||||
@@ -62,6 +72,16 @@ class Route
|
||||
return $this->path;
|
||||
}
|
||||
|
||||
public function setLocalizedPaths(array $localizedPaths)
|
||||
{
|
||||
$this->localizedPaths = $localizedPaths;
|
||||
}
|
||||
|
||||
public function getLocalizedPaths(): array
|
||||
{
|
||||
return $this->localizedPaths;
|
||||
}
|
||||
|
||||
public function setHost($pattern)
|
||||
{
|
||||
$this->host = $pattern;
|
||||
|
Reference in New Issue
Block a user