Fabien Potencier 14 anni fa
parent
commit
00b19e234d

+ 2 - 2
src/Symfony/Bundle/FrameworkBundle/Templating/Helper/TranslatorHelper.php

@@ -39,7 +39,7 @@ class TranslatorHelper extends Helper
     public function trans($id, array $parameters = array(), $domain = 'messages', $locale = null)
     {
         if (null === $this->translator) {
-            throw \RuntimeException('Translator is not enabled.');
+            throw new \RuntimeException('Translator is not enabled.');
         }
 
         return $this->translator->trans($id, $parameters, $domain, $locale);
@@ -51,7 +51,7 @@ class TranslatorHelper extends Helper
     public function transChoice($id, $number, array $parameters = array(), $domain = 'messages', $locale = null)
     {
         if (null === $this->translator) {
-            throw \RuntimeException('Translator is not enabled.');
+            throw new \RuntimeException('Translator is not enabled.');
         }
 
         return $this->translator->transChoice($id, $number, $parameters, $domain, $locale);

+ 1 - 1
src/Symfony/Bundle/TwigBundle/Extension/TransExtension.php

@@ -31,7 +31,7 @@ class TransExtension extends \Twig_Extension
     public function getTranslator()
     {
         if (null === $this->translator) {
-            throw \RuntimeException('Translator is not enabled.');
+            throw new \RuntimeException('Translator is not enabled.');
         }
 
         return $this->translator;

+ 8 - 0
src/Symfony/Component/HttpKernel/Kernel.php

@@ -85,6 +85,14 @@ abstract class Kernel implements HttpKernelInterface, \Serializable
 
     abstract public function registerBundles();
 
+    /**
+     * Registers the directories where bundles can be found.
+     *
+     * The order is significant and can be used by the application.
+     * For instance, it can be used to override templates.
+     *
+     * @return array A hash with namespaces as keys and directories as values
+     */
     abstract public function registerBundleDirs();
 
     abstract public function registerContainerConfiguration(LoaderInterface $loader);