dev-master
9999999-dev https://github.com/marcaddeo/silex-fractal-service-providerA Silex Service Provider for Fractal
MIT
The Development Requires
by Marc Addeo
service silex provider fractal
Wallogit.com
2017 © Pedro Peláez
A Silex Service Provider for Fractal
Fractal Service Provider for Silex, (*2)
Via Composer, (*3)
``` json { "require": { "madd/silex-fractal-service-provider": "dev-master" } }, (*4)
## Usage ``` php use League\Fractal\Collection; /** * You can set the scope identifier that Fractal uses to get its embeds here. * If not set here, it will default to 'embed' */ $app->register(new Madd\Silex\Provider\Fractal\FractalServiceProvider, array( 'fractal.scope_identifier' => 'embed' )); $resource = new Collection($model, new ModelTransformer); $data = $app['fractal']->createData($resource); print_r($data->toArray());
Note: The build is only passing because I have a test that only tests if true is true.. I still have to implement tests., (*5)
bash
$ phpunit, (*6)
Please see CONTRIBUTING for details., (*7)
The MIT License (MIT). Please see License File for more information., (*8)
A Silex Service Provider for Fractal
MIT
service silex provider fractal