浏览代码

updated bootstrap files

Fabien Potencier 14 年之前
父节点
当前提交
cf5cfb0b51

+ 4 - 2
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));
         }

+ 2 - 2
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())
     {