minetro / latte-email
Latte email helper to protect your email addresses.
Fund package maintenance!
f3l1x
contributte.org/partners.html
Installs: 15 213
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 6
Forks: 2
Open Issues: 0
Requires
- php: ^7.2
- latte/latte: ~2.5.1
- nette/utils: ~3.0.1
Requires (Dev)
- nette/di: ~3.0.0
- ninjify/nunjuck: ^0.2.0
- ninjify/qa: ^0.8.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan-deprecation-rules: ^0.11
- phpstan/phpstan-nette: ^0.11
- phpstan/phpstan-shim: ^0.11
- phpstan/phpstan-strict-rules: ^0.11
This package is not auto-updated.
Last update: 2022-02-01 12:45:18 UTC
README
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.
Consider to support contributte development team. Also thank you for being used this package.