<commit_before># Lily

A lightweight web application library for PHP 5.3+.

Lily provides your application with a common sense interface to HTTP. She also
provides routing, exception handling, dependency injection and more. This
project is inspired by the design of [ring][ring], especially in regards to the
use of higher order functions and middleware. 

Lil' Lily has very little to her weighing in at 904LOC. She aims to be readable
in one sitting.

```php
<?php
require __DIR__.'/vendor/autoload.php';

(new Lily\Adapter\HTTP)->run(
    new Lily\Application\RoutedApplication(
        [['GET', '/', 'Hello world']]));
?>
```

*This example uses PHP 5.4 as do all examples found in the [wiki][wiki]. Lily
supports 5.3+ though so you can backport examples.*

A slightly more complex example can be found in [`/example`][example].

[ring]: https://github.com/ring-clojure/ring
[wiki]: https://github.com/DrPheltRight/lily/wiki/000-overview
[example]: https://github.com/DrPheltRight/lily/blob/develop/example/

## Installation

Installing Lily through [composer][composer] is easy. Just create a `composer.json`
file in a new directory for your application:

```json
{
    "require": {
        "drpheltright/lily": "~0.4"
    }
}
```

Now run the following command in that directory:

```
curl -s https://getcomposer.org/installer | php && php composer.phar install
```

Done!

[composer]: http://getcomposer.org/

## Documentation

 - [Start here][start-here]
 - [Basics][basics]
 - [Routing][routing]
 - [Middleware][middleware]
    - [Error handling][error-handling]
    - [Dependency injection][di]
    - [Default headers][default-headers]
    - [Cookies][cookies]
    - [Sessions][sessions]
    - [Flash][flash]

 [start-here]: https://github.com/DrPheltRight/lily/wiki/000-overview
 [basics]: https://github.com/DrPheltRight/lily/wiki/001-basics
 [routing]: https://github.com/DrPheltRight/lily/wiki/002-routing
 [middleware]: https://github.com/DrPheltRight/lily/wiki/003-middleware
 [error-handling]: https://github.com/DrPheltRight/lily/wiki/errors
 [di]: https://github.com/DrPheltRight/lily/wiki/di
 [default-headers]: https://github.com/DrPheltRight/lily/wiki/default-headers
 [cookies]: https://github.com/DrPheltRight/lily/wiki/cookies
 [sessions]: https://github.com/DrPheltRight/lily/wiki/sessions
 [flash]: https://github.com/DrPheltRight/lily/wiki/flash-messages

## Tests
<commit_msg>Remove link to flash documentation when it doesn't exist<commit_after># Lily

A lightweight web application library for PHP 5.3+.

Lily provides your application with a common sense interface to HTTP. She also
provides routing, exception handling, dependency injection and more. This
project is inspired by the design of [ring][ring], especially in regards to the
use of higher order functions and middleware. 

Lil' Lily has very little to her weighing in at 904LOC. She aims to be readable
in one sitting.

```php
<?php
require __DIR__.'/vendor/autoload.php';

(new Lily\Adapter\HTTP)->run(
    new Lily\Application\RoutedApplication(
        [['GET', '/', 'Hello world']]));
?>
```

*This example uses PHP 5.4 as do all examples found in the [wiki][wiki]. Lily
supports 5.3+ though so you can backport examples.*

A slightly more complex example can be found in [`/example`][example].

[ring]: https://github.com/ring-clojure/ring
[wiki]: https://github.com/DrPheltRight/lily/wiki/000-overview
[example]: https://github.com/DrPheltRight/lily/blob/develop/example/

## Installation

Installing Lily through [composer][composer] is easy. Just create a `composer.json`
file in a new directory for your application:

```json
{
    "require": {
        "drpheltright/lily": "~0.4"
    }
}
```

Now run the following command in that directory:

```
curl -s https://getcomposer.org/installer | php && php composer.phar install
```

Done!

[composer]: http://getcomposer.org/

## Documentation

 - [Start here][start-here]
 - [Basics][basics]
 - [Routing][routing]
 - [Middleware][middleware]
    - [Error handling][error-handling]
    - [Dependency injection][di]
    - [Default headers][default-headers]
    - [Cookies][cookies]
    - [Sessions][sessions]

 [start-here]: https://github.com/DrPheltRight/lily/wiki/000-overview
 [basics]: https://github.com/DrPheltRight/lily/wiki/001-basics
 [routing]: https://github.com/DrPheltRight/lily/wiki/002-routing
 [middleware]: https://github.com/DrPheltRight/lily/wiki/003-middleware
 [error-handling]: https://github.com/DrPheltRight/lily/wiki/errors
 [di]: https://github.com/DrPheltRight/lily/wiki/di
 [default-headers]: https://github.com/DrPheltRight/lily/wiki/default-headers
 [cookies]: https://github.com/DrPheltRight/lily/wiki/cookies
 [sessions]: https://github.com/DrPheltRight/lily/wiki/sessions
 [flash]: https://github.com/DrPheltRight/lily/wiki/flash-messages

## Tests

{'fraction_non_alphanumeric': 0.14445364238410596, 'fraction_numerical': 0.01076158940397351, 'mean_word_length': 4.241865509761388, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 28, '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': '1234809', 'n_tokens_mistral': 1636, 'n_tokens_neox': 1565, 'n_words': 401}