minetro/latte-email

This package is abandoned and no longer maintained. The author suggests using the contributte/latte-email package instead.

Latte email helper to protect your email addresses.

v3.0.0 2019-06-16 14:06 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:45:18 UTC


README

68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f6769747465722f6379616e 68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f666f72756d2f79656c6c6f77 68747470733a2f2f62616467656e2e6e65742f62616467652f73706f6e736f722f646f6e6174696f6e732f463936383534

Website 🚀 contributte.org | Contact 👨🏻‍💻 f3l1x.io | Twitter 🐦 @contributte

Disclaimer

⚠️ This project is no longer being maintained. Please use contributte/latte.
Composer contributte/latte
Version
PHP
License

Versions

State Version Branch Nette PHP
dev ^3.1 master 3.0+ ^7.2
stable ^3.0 master 3.0+ ^7.2
stable ^2.0 master 2.4 >=5.6
stable ^1.2 master 2.4 >=5.4 (old namespace)

Usage 🎉

Setup

Register filter (in case you use nette/di)

services:
    nette.latteFactory:
        setup:
            - addFilter('email', 'Contributte\Latte\Helpers\EmailHelper::mailto')
            # or
            - addFilter('email', ['Contributte\Latte\Helpers\EmailHelper', 'mailto'])

Alternatively you can also add filter directly to template

use Contributte\Latte\Email\Helpers\EmailHelper;

public function createTemplate()
{
    $template = parent::createTemplate();
    $template->addFilter('email', [EmailHelper::class, 'mailto']);
}

Usage

{var $mail = "my@email.net"}

{$mail|email:"javascript"}
{$mail|email:"javascript_charcode"}
{$mail|email:"hex"|noescape}
{$mail|email:"javascript":"link to my email here"}
{$mail|email:"drupal"}
{$mail|email:"texy"}

Supported encoding methods

  • javascript
  • javascript_charcode
  • hex
  • drupal
  • texy

Development

This package was maintain by these authors.

538058?v=3&s=80

Consider to support contributte development team. Also thank you for being used this package.