<commit_before>The one and only PHP 6 framework.

## Why?

Because PHP 6 rocks!

## Demo

A demo is included in this package ([`index.php`](index.php)), just run this command and visit http://localhost:8000/index.php

```
docker-compose up
```

## Usage

Here is a short example:

```php
require_once __DIR__ . '/theframework.php';

$app = pipe(array(
    'security_middleware',
    route(array(
        '/' => function () {
            echo 'Hello world!;
        },
    )),
));

$app();
```

This will display "Hello world!" on the home page.<commit_msg>Improve example<commit_after>The one and only PHP 6 framework.

## Why?

Because PHP 6 rocks!

## Demo

A demo is included in this package ([`index.php`](index.php)), just run this command and visit http://localhost:8000/index.php

```
docker-compose up
```

## Usage

To build a simple application with different routes:

```php
require_once __DIR__ . '/theframework.php';

$app = route(array(
    '/' => function () {
        echo 'The home page';
    },
    '/about' => function () {
        echo 'The about page';
    },
));

$app();
```

If you want to add middlewares before the router, simply use the pipe:

```php
require_once __DIR__ . '/theframework.php';

$app = pipe(array(
    'security_middleware',
    route(array(
        '/' => function () {
            echo 'Hello world!;
        },
    )),
));

$app();
```
{'fraction_non_alphanumeric': 0.15701881331403764, 'fraction_numerical': 0.008683068017366137, 'mean_word_length': 2.9401709401709404, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '274275', 'n_tokens_mistral': 468, 'n_tokens_neox': 440, 'n_words': 141}