public function link($title, $mail, array $options = [])
    {
        //Obfuscates the title, if the title is the email address
        $title = filter_var($title, FILTER_VALIDATE_EMAIL) ? $this->obfuscate($title) : $title;

        $mail = Security::encryptMail($mail);
        $url = Router::url(['_name' => 'mailhide', '?' => compact('mail')], true);

        $options['escape'] = false;
        $options['onClick'] = sprintf('window.open(\'%s\',\'%s\',\'resizable,height=547,width=334\'); return false;', $url, $title);
        $options += ['class' => 'recaptcha-mailhide', 'title' => $title];

        return $this->Html->link($title, $url, $options);
    }
public function link($title, $mail, array $options = [])
    {
        //Obfuscates the title, if the title is the email address
        $title = filter_var($title, FILTER_VALIDATE_EMAIL) ? $this->obfuscate($title) : $title;

        $mail = Security::encryptMail($mail);
        $url = Router::url(['_name' => 'mailhide', '?' => compact('mail')], true);

        $options['escape'] = false;
        $options['onClick'] = sprintf('window.open(\'%s\',\'%s\',\'resizable,height=547,width=334\'); return false;', $url, $title);
        $options += ['class' => 'recaptcha-mailhide', 'title' => $title];

        return $this->Html->link($title, $url, $options);
    }
public function link ( $ title , $ mail , array $ options = [ ] ) { //Obfuscates the title, if the title is the email address $ title = filter_var ( $ title , FILTER_VALIDATE_EMAIL ) ? $ this -> obfuscate ( $ title ) : $ title ; $ mail = Security :: encryptMail ( $ mail ) ; $ url = Router :: url ( [ '_name' => 'mailhide' , '?' => compact ( 'mail' ) ] , true ) ; $ options [ 'escape' ] = false ; $ options [ 'onClick' ] = sprintf ( 'window.open(\'%s\',\'%s\',\'resizable,height=547,width=334\'); return false;' , $ url , $ title ) ; $ options += [ 'class' => 'recaptcha-mailhide' , 'title' => $ title ] ; return $ this -> Html -> link ( $ title , $ url , $ options ) ; }
Creates a link for the page where you enter the code and from which the
clear email address will be displayed
@param string $title Link title. If it is the email address, it will be
obfuscated
@param string $mail Email for which you want to create the link. It
will not be shown clearly
@param array $options Array of options and HTML attributes
@return string An `<a />` element
@uses \RecaptchaMailhide\Utility\Security::encryptMail()
@uses obfuscate()
Creates a link for the page where you enter the code and from which the clear email address will be displayed