예제 #1
0
 /**
  * Adds the signature (value from mail/signature) to the message body
  *
  * @param string $body
  * @param string $mime
  * @return string
  */
 protected function appendSignature($body, $mime)
 {
     $tokens = array('[SITE_TITLE]' => $this->_config->get('config/title'), '[SITE_SLOGAN]' => $this->_config->get('config/slogan'));
     $signature = str_replace(array_keys($tokens), array_values($tokens), $this->config['signature']);
     if ($mime == 'text/html') {
         $signature = zula_nls2p($signature);
     }
     return $body . "\n\n" . $signature;
 }
예제 #2
0
 /**
  * Main method for parsing the text
  *
  * @param bool $break
  * @return string
  */
 public function parse($break = false)
 {
     $text = preg_replace_callback('#([A-Z][A-Z0-9+.\\-]+://|www\\.)[A-Z0-9][A-Z0-9.\\-]+\\.[A-Z0-9.\\-]+(:\\d+)?(/([^\\s\\r\\n]+)?)?#im', array($this, 'urlReplace'), zula_htmlspecialchars($this->breakText($break)));
     return zula_nls2p($text);
 }