浏览代码

[DependencyInjection] Added missing methods in the ParameterBagInterface

The Container relies on the resolve() value which was not part of
the interface.
Christophe Coevoet 14 年之前
父节点
当前提交
1bb6b97c1c
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php

+ 14 - 0
src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php

@@ -66,4 +66,18 @@ interface ParameterBagInterface
      * @return Boolean true if the parameter name is defined, false otherwise
      * @return Boolean true if the parameter name is defined, false otherwise
      */
      */
     function has($name);
     function has($name);
+
+    /**
+     * Replaces parameter placeholders (%name%) by their values for all parameters.
+     */
+    public function resolve();
+
+    /**
+     * Replaces parameter placeholders (%name%) by their values.
+     *
+     * @param  mixed $value A value
+     *
+     * @throws NonExistentParameterException if a placeholder references a parameter that does not exist
+     */
+    public function resolveValue($value);
 }
 }