enm / json-api-server-resource-mapper-bundle
Symfony integration for enm/json-api-server-resource-mappers
Installs: 1 198
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Requires
- php: >=7.0
- enm/json-api-server-resource-mappers: ^1.1
- symfony/dependency-injection: ^2.7|^3.0|^4.0
- symfony/http-kernel: ^2.7|^3.0|^4.0
Requires (Dev)
- phpunit/phpunit: ^6.3
This package is auto-updated.
Last update: 2020-01-02 12:49:03 UTC
README
Symfony integration for enm/json-api-server-resource-mappers
Installation
You should install enm/json-api-server-bundle
before, but it's not required!
composer require enm/json-api-server-resource-mapper-bundle
in your AppKernel
:
public function registerBundles(): array { $bundles = [ // ... new Enm\Bundle\JsonApi\Server\ResourceMappers\EnmJsonApiServerResourceMapperBundle(), // ... ]; return $bundles; }
Usage
Your resource mappers must be defined as services and tagged with json_api_server.resource_mapper
to be detected by this bundle.
services: app.resource_mappers.example: class: AppBundle\ResourceMappers\ExampleMapper tags: - { name: 'json_api_server.resource_mapper' }
The registry service, which you will need for dependency injection, is Enm\JsonApi\Server\ResourceMappers\Mapper\ResourceMapperInterface
.