porkchopsandwiches / preserialiserserviceprovider
A Silex Service Provider for the Preserialiser
Installs: 66
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/porkchopsandwiches/preserialiserserviceprovider
Requires
- porkchopsandwiches/preserialiser: ~1.0
- silex/silex: ~1.2
This package is not auto-updated.
Last update: 2025-10-25 21:07:45 UTC
README
A Silex Service Provider for the Preserialiser library.
use PorkChopSandwiches\PreserialiserServiceProvider\PreserialiserServiceProvider; $app -> register(new PreserialiserServiceProvider(), array( "preserialiser.default_args" => array() )); $result = $app["preserialiser"] -> preserialise(...);
Also includes a trait for simple shortcut methods and code completion
class MyApplication extends \Silex\Application { use PorkChopSandwiches\PreserialiserServiceProvider\PreserialiserTrait; } $app = new MyApplication(); $app -> get("/", function () { # Access Preserialiser instance $app -> getPreserialiser() -> addDefaultArgs(array("foo" => true)) -> preserialise(...); # Invoke preserialise() directly $result = $app -> preserialise(...); });
Install via Composer
{ "require": { "porkchopsandwiches/preserialiserserviceprovider" } }