library preserialiserserviceprovider
A Silex Service Provider for the Preserialiser
porkchopsandwiches/preserialiserserviceprovider
A Silex Service Provider for the Preserialiser
- Monday, March 9, 2015
- by PorkChopSandwiches
- Repository
- 1 Watchers
- 0 Stars
- 34 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
PreserialiserServiceProvider
A Silex Service Provider for the Preserialiser library., (*1)
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, (*2)
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"
}
}
dev-master
9999999-dev
A Silex Service Provider for the Preserialiser
Sources
Download
MIT
The Requires
1.0.0
1.0.0.0
A Silex Service Provider for the Preserialiser
Sources
Download
MIT
The Requires