updated bootstrap files

This commit is contained in:
Fabien Potencier 2011-02-13 11:24:47 +01:00
parent b716b707ba
commit cf5cfb0b51
2 changed files with 6 additions and 4 deletions

View File

@ -16,7 +16,7 @@ interface ContainerInterface
function setParameter($name, $value); function setParameter($name, $value);
function enterScope($name); function enterScope($name);
function leaveScope($name); function leaveScope($name);
function addScope($name, $parentScope = self::SCOPE_CONTAINER); function addScope(ScopeInterface $scope);
function hasScope($name); function hasScope($name);
function isScopeActive($name); function isScopeActive($name);
} }
@ -165,8 +165,10 @@ class Container implements ContainerInterface
$this->services = call_user_func_array('array_merge', $services); $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) { if (self::SCOPE_CONTAINER === $name || self::SCOPE_PROTOTYPE === $name) {
throw new \InvalidArgumentException(sprintf('The scope "%s" is reserved.', $name)); throw new \InvalidArgumentException(sprintf('The scope "%s" is reserved.', $name));
} }

View File

@ -1964,10 +1964,10 @@ namespace Symfony\Component\HttpFoundation
class ResponseHeaderBag extends HeaderBag class ResponseHeaderBag extends HeaderBag
{ {
protected $computedCacheControl = array(); protected $computedCacheControl = array();
public function __construct(array $parameters = array()) public function __construct(array $headers = array())
{ {
parent::__construct(); parent::__construct();
$this->replace($parameters); $this->replace($headers);
} }
public function replace(array $headers = array()) public function replace(array $headers = array())
{ {