Exemple #1
0
 public static function text2mailto($data)
 {
     $email = '/(';
     $email .= Sitengine_Regex::getMailbox();
     $email .= Sitengine_Regex::getServerName();
     $email .= ')/';
     return preg_replace($email, '<a href="mailto:\\1">\\1</a>', $data);
 }
Exemple #2
0
 public static function serverName($val)
 {
     $p = '/^';
     $p .= '((ftp|https?):\\/\\/)?';
     # protocol
     $p .= Sitengine_Regex::getServerName();
     $p .= '$/';
     return preg_match($p, $val);
 }