final-gene / zf-hal-hydrator-module
ZF-HAL specific hydrator
1.0.0
2015-12-23 18:06 UTC
Requires
- zendframework/zend-config: ^2.5
- zendframework/zend-modulemanager: ^2.5
- zfcampus/zf-hal: ^1.2
Requires (Dev)
- phpunit/phpunit: ^4.8
- zendframework/zend-filter: ^2.5
- zendframework/zend-form: ^2.5
- zendframework/zend-i18n: ^2.5
- zendframework/zend-inputfilter: ^2.5
- zendframework/zend-log: ^2.5
- zendframework/zend-serializer: ^2.5
- zendframework/zend-stdlib: ^2.5
- zendframework/zend-test: ^2.5
- zendframework/zend-validator: ^2.5
This package is auto-updated.
Last update: 2024-12-10 23:22:52 UTC
README
Introduction
This module provides a hydrator which can be used to manual map the name of REST-Entity classes to custom keys.
Installation
Install the package
Run in your shell:
$ composer require "final-gene/zf-hal-hydrator-module"
Load the module
Add the key FinalGene\ZfHalHydratorModule
in your application.config.php
Configure the ZF-Hal hydrator
'zf-hal' => [ 'renderer' => [ 'default_hydrator' => 'FinalGene\ZfHalHydratorModule\RestEntityHydrator' ] ],
Or configure the hydrator for specific class types via the metadata_map
key (documentation) (sub-key hydrator
).
Look at the documentation of zf-hal for further details.
Configuration
User Configuration
The top-level key used to configure this module is zf-hal-hydrator-module
.
Key: map
An array of class names (key) and their intended name in the output (value).
User configuration example:
'map' => [ 'FinalGene\FooModule\Rest\Entity\BarEntity' => 'final-gene:foo-bar' ]
System Configuration
'service_manager' => [ 'factories' => [ 'FinalGene\ZfHalHydratorModule\ModuleOptions' => 'FinalGene\ZfHalHydratorModule\Options\ModuleOptionsFactory' ], ], 'hydrators' => [ 'factories' => [ 'FinalGene\ZfHalHydratorModule\RestEntityHydrator' => 'FinalGene\ZfHalHydratorModule\Hydrator\HalEntityHydratorFactory' ], ],