<commit_before># Glide universal module

This package integrates Glide in any [definition-interop](https://github.com/container-interop/definition-interop) compatible framework/container.

## Installation

```
composer require mnapoli/glide-module
```

Once installed, you need to register the [definition provider](src/GlideDefinitionProvider.php) into your container:

```php
$definitionProvider = new \GlideModule\GlideDefinitionProvider();

// register $definitionProvider
```

## Usage

This module registers the Glide server (`League\Glide\Server`) under the `glide` key in your service container. You can now inject it in your services. Have a look at [the official documentation](http://glide.thephpleague.com/0.3/simple-example/) to know how to use the server.

## Configuration

You can configure the server by defining a `glide.options` container entry:

```php
return [
    'source' => 'path/to/source/folder',
    'cache' => 'path/to/cache/folder',
];
```

All the options are passed straight to Glide's `ServerFactory`. Have a look at [the official documentation about configuration](http://glide.thephpleague.com/0.3/config/the-server/) to learn about all the options you can use.<commit_msg>Documentation improvement<commit_after># Glide universal module

This package integrates Glide in any [definition-interop](https://github.com/container-interop/definition-interop) compatible framework/container.

## Installation

```
composer require mnapoli/glide-module
```

Once installed, you need to register the [definition provider](src/GlideDefinitionProvider.php) into your container:

```php
$definitionProvider = new \GlideModule\GlideDefinitionProvider();

// register $definitionProvider in your container or framework
```

Refer to your framework or container's documentation to learn how to register *definition-interop* modules.

## Usage

This module registers the Glide server (`League\Glide\Server`) under the `glide` key in your service container. You can now inject it in your services. Have a look at [the official documentation](http://glide.thephpleague.com/0.3/simple-example/) to know how to use the server.

## Configuration

You can configure the server by defining a `glide.options` container entry. That entry should be an array containing Glide options.

Example for a container using array configuration:

```php
    'glide.options' => [
        'source' => 'path/to/source/folder',
        'cache' => 'path/to/cache/folder',
    ]
```

All the options are passed straight to Glide's `ServerFactory`. Have a look at [the official documentation about configuration](http://glide.thephpleague.com/0.3/config/the-server/) to learn about all the options you can use.
{'fraction_non_alphanumeric': 0.10403554239170677, 'fraction_numerical': 0.002961865975564606, 'mean_word_length': 4.83585313174946, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6552630', 'n_tokens_mistral': 743, 'n_tokens_neox': 717, 'n_words': 271}