X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fdependency-injection%2FAlias.php;h=de14c5ea9512bcafe5bf3b49c934aa584a830d08;hb=4e1bfbf98b844da83b18aca92ef00f11a4735806;hp=eaf7f00ccd446d4ec4cf5f5979a1b224f9a72d9b;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/dependency-injection/Alias.php b/vendor/symfony/dependency-injection/Alias.php index eaf7f00cc..de14c5ea9 100644 --- a/vendor/symfony/dependency-injection/Alias.php +++ b/vendor/symfony/dependency-injection/Alias.php @@ -15,6 +15,7 @@ class Alias { private $id; private $public; + private $private; /** * @param string $id Alias identifier @@ -22,8 +23,9 @@ class Alias */ public function __construct($id, $public = true) { - $this->id = strtolower($id); + $this->id = (string) $id; $this->public = $public; + $this->private = 2 > \func_num_args(); } /** @@ -40,10 +42,44 @@ class Alias * Sets if this Alias is public. * * @param bool $boolean If this Alias should be public + * + * @return $this */ public function setPublic($boolean) { $this->public = (bool) $boolean; + $this->private = false; + + return $this; + } + + /** + * Sets if this Alias is private. + * + * When set, the "private" state has a higher precedence than "public". + * In version 3.4, a "private" alias always remains publicly accessible, + * but triggers a deprecation notice when accessed from the container, + * so that the alias can be made really private in 4.0. + * + * @param bool $boolean + * + * @return $this + */ + public function setPrivate($boolean) + { + $this->private = (bool) $boolean; + + return $this; + } + + /** + * Whether this alias is private. + * + * @return bool + */ + public function isPrivate() + { + return $this->private; } /**