From cf5cfb0b516021e00bbd02e03553ced99a1c75b8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 13 Feb 2011 11:24:47 +0100 Subject: [PATCH] updated bootstrap files --- src/Symfony/Component/HttpKernel/bootstrap.php | 6 ++++-- src/Symfony/Component/HttpKernel/bootstrap_cache.php | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/bootstrap.php b/src/Symfony/Component/HttpKernel/bootstrap.php index 378fe0655f..41718f340e 100644 --- a/src/Symfony/Component/HttpKernel/bootstrap.php +++ b/src/Symfony/Component/HttpKernel/bootstrap.php @@ -16,7 +16,7 @@ interface ContainerInterface function setParameter($name, $value); function enterScope($name); function leaveScope($name); - function addScope($name, $parentScope = self::SCOPE_CONTAINER); + function addScope(ScopeInterface $scope); function hasScope($name); function isScopeActive($name); } @@ -165,8 +165,10 @@ class Container implements ContainerInterface $this->services = call_user_func_array('array_merge', $services); } } - public function addScope($name, $parentScope = self::SCOPE_CONTAINER) + public function addScope(ScopeInterface $scope) { + $name = $scope->getName(); + $parentScope = $scope->getParentName(); if (self::SCOPE_CONTAINER === $name || self::SCOPE_PROTOTYPE === $name) { throw new \InvalidArgumentException(sprintf('The scope "%s" is reserved.', $name)); } diff --git a/src/Symfony/Component/HttpKernel/bootstrap_cache.php b/src/Symfony/Component/HttpKernel/bootstrap_cache.php index 1e7a0d793f..960d3cbab8 100644 --- a/src/Symfony/Component/HttpKernel/bootstrap_cache.php +++ b/src/Symfony/Component/HttpKernel/bootstrap_cache.php @@ -1964,10 +1964,10 @@ namespace Symfony\Component\HttpFoundation class ResponseHeaderBag extends HeaderBag { protected $computedCacheControl = array(); - public function __construct(array $parameters = array()) + public function __construct(array $headers = array()) { parent::__construct(); - $this->replace($parameters); + $this->replace($headers); } public function replace(array $headers = array()) {