Ver Fonte

moved the constant from the interface back into the class

Laszlo Korte há 14 anos atrás
pai
commit
282a493af2

+ 6 - 1
src/Symfony/Component/Console/Formatter/OutputFormatter.php

@@ -20,6 +20,11 @@ namespace Symfony\Component\Console\Formatter;
  */
 class OutputFormatter implements OutputFormatterInterface
 {
+    /**
+     * The pattern to phrase the format.
+     */
+    const FORMAT_PATTERN = '#<([a-z][a-z0-9_=;-]+)>(.*?)</\\1?>#is';
+
     private $decorated;
     private $styles = array();
 
@@ -125,7 +130,7 @@ class OutputFormatter implements OutputFormatterInterface
      */
     public function format($message)
     {
-        return preg_replace_callback(OutputFormatterInterface::FORMAT_PATTERN, array($this, 'replaceStyle'), $message);
+        return preg_replace_callback(self::FORMAT_PATTERN, array($this, 'replaceStyle'), $message);
     }
 
     /**

+ 0 - 4
src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php

@@ -20,10 +20,6 @@ namespace Symfony\Component\Console\Formatter;
  */
 interface OutputFormatterInterface
 {
-    /**
-     * The pattern to phrase the format.
-     */
-    const FORMAT_PATTERN = '#<([a-z][a-z0-9_=;-]+)>(.*?)</\\1?>#is';
 
     /**
      * Sets the decorated flag.