<commit_before># DBAL Paginator Service Provider for Silex

Based on [KnpLabs' PaginatorBundle](https://github.com/KnpLabs/KnpPaginatorBundle).

## Usage

1) When registering `TwigServiceProvider`, add the paginator's template path (create your own or just use KnpPaginatorBundle's).

```php
$app->register(new Silex\Provider\TwigServiceProvider(), array(
    'twig.path' => array(
        /* Your other templates */
        __DIR__.'/../vendor/knplabs/knp-paginator-bundle/Knp/Bundle/PaginatorBundle/Resources/views',
    ),
));
```

2) Register `DBALPaginatorServiceProvider`.

```php
$app->register(new Dezull\Silex\Provider\DBALPaginatorServiceProvider\DBALPaginatorServiceProvider(), array(
    /* The following assumes you use the template path as in step #1 */
    'dezull.dbal_paginator.template.pagination' => 'Pagination/twitter_bootstrap_pagination.html.twig',
    'dezull.dbal_paginator.template.sortable' => 'Pagination/sortable_link.html.twig',
));
```
<commit_msg>Add installation instruction<commit_after># DBAL Paginator Service Provider for Silex

Based on [KnpLabs' PaginatorBundle](https://github.com/KnpLabs/KnpPaginatorBundle).

## Installation

Add to composer.json

```json
{
    "require": {
        "dezull/dbal-paginator-service-provider": "dev-master"
    }
}
```

## Usage

1) When registering `TwigServiceProvider`, add the paginator's template path (create your own or just use KnpPaginatorBundle's).

```php
$app->register(new Silex\Provider\TwigServiceProvider(), array(
    'twig.path' => array(
        /* Your other templates */
        __DIR__.'/../vendor/knplabs/knp-paginator-bundle/Knp/Bundle/PaginatorBundle/Resources/views',
    ),
));
```

2) Register `DBALPaginatorServiceProvider`.

```php
$app->register(new Dezull\Silex\Provider\DBALPaginatorServiceProvider\DBALPaginatorServiceProvider(), array(
    /* The following assumes you use the template path as in step #1 */
    'dezull.dbal_paginator.template.pagination' => 'Pagination/twitter_bootstrap_pagination.html.twig',
    'dezull.dbal_paginator.template.sortable' => 'Pagination/sortable_link.html.twig',
));
```

{'fraction_non_alphanumeric': 0.13617021276595745, 'fraction_numerical': 0.0028368794326241137, 'mean_word_length': 4.75, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 13, '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': '1901102', 'n_tokens_mistral': 700, 'n_tokens_neox': 686, 'n_words': 132}