Browse Source

Get parameter from the parameters.yml

jmontoya 9 years ago
parent
commit
0a8f8b79e6
1 changed files with 14 additions and 0 deletions
  1. 14 0
      src/Chamilo/CoreBundle/Framework/Container.php

+ 14 - 0
src/Chamilo/CoreBundle/Framework/Container.php

@@ -65,6 +65,20 @@ class Container
         return self::$configDir;
     }
 
+    /**
+     * @param string $parameter
+     *
+     * @return mixed
+     */
+    public static function getParameter($parameter)
+    {
+        if (self::$container->hasParameter($parameter)) {
+            return self::$container->getParameter($parameter);
+        }
+
+        return false;
+    }
+
     /**
      * @return string
      */