monolyth / plumber
Utilities for the Monolyth unframework
1.1.0
2018-02-14 06:16 UTC
Requires
- ext-mbstring: *
Requires (Dev)
- toast/unit: ^1.3
This package is auto-updated.
Last update: 2024-12-14 23:34:45 UTC
README
Utilities for the Monolyth unframework
Installation
Composer (recommended)
$ composer require monolyth/plumber
Manual
- Download or clone the repository;
- Add
/path/to/plumber/src
for namespaceMonolyth\Plumber
to your PSR-4 autoloader.
Usage
Currently only 2 utilities are included: Utf8
and Proxy
. Statically call
the handle
method on the classes to utilise them.
Utf8
The Utf8::handle
method normalises PHP's UTF-8 handling.
Proxy
The Proxy::handle
method attempts to normalise the X_HTTP_FORWARDED_FOR
header so you can just use REMOTE_ADDR
everywhere. Note that not all proxies
handle this the same, so you might need to roll your own.