PHPackages                             vasadibt/yii2-protector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. vasadibt/yii2-protector

ActiveYii2-extension[Security](/categories/security)

vasadibt/yii2-protector
=======================

Hide emails and phone numbers from spam robots

1.0.3(5y ago)4131BSD-3-ClausePHP

Since May 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/vasadibt/yii2-protector)[ Packagist](https://packagist.org/packages/vasadibt/yii2-protector)[ RSS](/packages/vasadibt-yii2-protector/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Yii2 Spam protector
===================

[](#yii2-spam-protector)

Hide emails and phone numbers from spam robots

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist vasadibt/yii2-protector "*"

```

or add

```
"vasadibt/yii2-protector": "*"

```

to the require section of your `composer.json` file.

Configuration
-------------

[](#configuration)

A simple example to integrate module.

```
'bootstrap' => [
    // ...
    'protector',
],
'components' => [
    // ...
    'protector' => [
         'class' => '\vasadibt\protector\ProtectData',
    ],
],
```

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by by html format:

```
Contact

[[protect:0036 70 1111 222]]

[[protect:info@mycompany.com]]

Write to me[[protect:info@company.com]]
```

Or use php helpers

```
