<commit_before>Tecnocen.com Yii2 File Handler
=========================

[![Latest Stable Version](https://poser.pugx.org/tecnocen/yii2-filehandler/v/stable)](https://packagist.org/packages/tecnocen/yii2-filehandler) [![Total Downloads](https://poser.pugx.org/tecnocen/yii2-filehandler/downloads)](https://packagist.org/packages/tecnocen/yii2-filehandler) [![Latest Unstable Version](https://poser.pugx.org/tecnocen/yii2-filehandler/v/unstable)](https://packagist.org/packages/tecnocen/yii2-filehandler) [![License](https://poser.pugx.org/tecnocen/yii2-filehandler/license)](https://packagist.org/packages/tecnocen/yii2-filehandler)

Library to easily handle upload, validation and storage of files using Yii2.

## Installation

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

Either run

```bash
composer require --prefer-dist "tecnocen/yii2-filehandler:*"
```

or add

```
"tecnocen/yii2-filehandler": "*"
```

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

## Usage

### FileHandlerValidator

`tecnocen\filehandler\validators\FileHandlerValidator` is configured with a
`folderPath`, its meant to vaildate and then save uploaded files into the
`folderPath` or receive an string which will seek as a file on the `folderPath`
and then validate the found file.

```php
use tecnocen\filehandler\validators\FileHandlerValidator;
use yii\base\Model;

class UserImage extends Model
{
    public function rules()
    {
        return [
            [
                ['route'],
                FileHandlerValidator::className(),
                'folderPath' => '@webroot/uploads'
            ]
        ];
    }
}
```

## Documentation

TODO

## License

The BSD License (BSD). Please see [License File](LICENSE.md) for more information.<commit_msg>:book: section documentation<commit_after>Tecnocen.com Yii2 File Handler
=========================

[![Latest Stable Version](https://poser.pugx.org/tecnocen/yii2-filehandler/v/stable)](https://packagist.org/packages/tecnocen/yii2-filehandler) [![Total Downloads](https://poser.pugx.org/tecnocen/yii2-filehandler/downloads)](https://packagist.org/packages/tecnocen/yii2-filehandler) [![Latest Unstable Version](https://poser.pugx.org/tecnocen/yii2-filehandler/v/unstable)](https://packagist.org/packages/tecnocen/yii2-filehandler) [![License](https://poser.pugx.org/tecnocen/yii2-filehandler/license)](https://packagist.org/packages/tecnocen/yii2-filehandler)

Library to easily handle upload, validation and storage of files using Yii2.

## Installation

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

Either run

```bash
composer require --prefer-dist "tecnocen/yii2-filehandler:*"
```

or add

```
"tecnocen/yii2-filehandler": "*"
```

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

## Documentation

[Actions Documentation](actions/README.md)

[Behaviors Documentation](behaviors/README.md)

[Validators Documentation](validators/README.md)

## License

The BSD License (BSD). Please see [License File](LICENSE.md) for more information.
{'fraction_non_alphanumeric': 0.15315315315315314, 'fraction_numerical': 0.007722007722007722, 'mean_word_length': 4.768089053803339, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2906366', 'n_tokens_mistral': 1053, 'n_tokens_neox': 1017, 'n_words': 198}