HEREDOCs in class member initializers don't seem to work in PHP 5.2.x (parse error)
authorChuck Hagenbuch <chuck@bluestatedigital.com>
Sat, 24 Jul 2010 20:27:06 +0000 (16:27 -0400)
committerChuck Hagenbuch <chuck@bluestatedigital.com>
Sat, 24 Jul 2010 20:27:06 +0000 (16:27 -0400)
framework/Text_Filter/lib/Horde/Text/Filter/Emails.php

index 80c780c..f536fb6 100644 (file)
@@ -38,11 +38,13 @@ class Horde_Text_Filter_Emails extends Horde_Text_Filter_Base
     );
 
     /**
-     * Email regular expression.
+     * Returns a hash with replace patterns.
      *
-     * @var string
+     * @return array  Patterns hash.
      */
-    protected $_regexp = <<<EOR
+    public function getPatterns()
+    {
+        $this->_regexp = <<<EOR
         /
             # Version 1: mailto: links with any valid email characters.
             # Pattern 1: Outlook parenthesizes in square brackets
@@ -67,13 +69,6 @@ class Horde_Text_Filter_Emails extends Horde_Text_Filter_Base
         /ix
 EOR;
 
-    /**
-     * Returns a hash with replace patterns.
-     *
-     * @return array  Patterns hash.
-     */
-    public function getPatterns()
-    {
         return array('regexp_callback' => array(
             $this->_regexp => array($this, 'regexCallback')
         ));