X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=inline;f=vendor%2Fsymfony%2Frouting%2FRoute.php;fp=vendor%2Fsymfony%2Frouting%2FRoute.php;h=69a7cade10c334aad45e41bc4aad01284d06d900;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=fee2002c9d9bb32a3dff243a8c254016c6538fa0;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/vendor/symfony/routing/Route.php b/vendor/symfony/routing/Route.php index fee2002c9..69a7cade1 100644 --- a/vendor/symfony/routing/Route.php +++ b/vendor/symfony/routing/Route.php @@ -70,6 +70,7 @@ class Route implements \Serializable * Available options: * * * compiler_class: A class name able to compile this route instance (RouteCompiler by default) + * * utf8: Whether UTF-8 matching is enforced ot not * * @param string $path The path pattern to match * @param array $defaults An array of default parameter values @@ -87,14 +88,8 @@ class Route implements \Serializable $this->setRequirements($requirements); $this->setOptions($options); $this->setHost($host); - // The conditions make sure that an initial empty $schemes/$methods does not override the corresponding requirement. - // They can be removed when the BC layer is removed. - if ($schemes) { - $this->setSchemes($schemes); - } - if ($methods) { - $this->setMethods($methods); - } + $this->setSchemes($schemes); + $this->setMethods($methods); $this->setCondition($condition); } @@ -138,38 +133,6 @@ class Route implements \Serializable } } - /** - * Returns the pattern for the path. - * - * @return string The pattern - * - * @deprecated since version 2.2, to be removed in 3.0. Use getPath instead. - */ - public function getPattern() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED); - - return $this->path; - } - - /** - * Sets the pattern for the path. - * - * This method implements a fluent interface. - * - * @param string $pattern The path pattern - * - * @return $this - * - * @deprecated since version 2.2, to be removed in 3.0. Use setPath instead. - */ - public function setPattern($pattern) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the setPath() method instead.', E_USER_DEPRECATED); - - return $this->setPath($pattern); - } - /** * Returns the pattern for the path. * @@ -250,14 +213,6 @@ class Route implements \Serializable public function setSchemes($schemes) { $this->schemes = array_map('strtolower', (array) $schemes); - - // this is to keep BC and will be removed in a future version - if ($this->schemes) { - $this->requirements['_scheme'] = implode('|', $this->schemes); - } else { - unset($this->requirements['_scheme']); - } - $this->compiled = null; return $this; @@ -299,14 +254,6 @@ class Route implements \Serializable public function setMethods($methods) { $this->methods = array_map('strtoupper', (array) $methods); - - // this is to keep BC and will be removed in a future version - if ($this->methods) { - $this->requirements['_method'] = implode('|', $this->methods); - } else { - unset($this->requirements['_method']); - } - $this->compiled = null; return $this; @@ -540,12 +487,6 @@ class Route implements \Serializable */ public function getRequirement($key) { - if ('_scheme' === $key) { - @trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getSchemes() instead.', E_USER_DEPRECATED); - } elseif ('_method' === $key) { - @trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getMethods() instead.', E_USER_DEPRECATED); - } - return isset($this->requirements[$key]) ? $this->requirements[$key] : null; } @@ -643,17 +584,6 @@ class Route implements \Serializable throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" cannot be empty.', $key)); } - // this is to keep BC and will be removed in a future version - if ('_scheme' === $key) { - @trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the setSchemes() method instead.', E_USER_DEPRECATED); - - $this->setSchemes(explode('|', $regex)); - } elseif ('_method' === $key) { - @trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the setMethods() method instead.', E_USER_DEPRECATED); - - $this->setMethods(explode('|', $regex)); - } - return $regex; } }