App\Libraries\BBCodeFromDB::parseEmail PHP Метод

parseEmail() публичный Метод

public parseEmail ( $text )
    public function parseEmail($text)
    {
        $text = preg_replace("#\\[email:{$this->uid}\\](.+?)\\[/email:{$this->uid}\\]#", "<a rel='nofollow' href='mailto:\\1'>\\1</a>", $text);
        $text = preg_replace("#\\[email=(.+?):{$this->uid}\\]#", "<a rel='nofollow' href='mailto:\\1'>", $text);
        $text = str_replace("[/email:{$this->uid}]", '</a>', $text);
        return $text;
    }