tobias/zend-expressive-hydrator-delegator

This package is abandoned and no longer maintained. No replacement package was suggested.

HydratorPluginManager delegator to create hydrators from config.

1.0.0 2016-12-28 12:18 UTC

This package is auto-updated.

Last update: 2020-02-01 19:24:09 UTC


README

License Latest Stable Version PHP 7 ready Build Status Coverage Status Total Downloads

Delegator for Zend HydratorPluginManager

This package provides a delegator for the HydratorPluginManager which configures the PluginManager to use the service configuration from hydrators from your config.

The package is intended to be used with Zend Expressive Skeleton or any other Zend Expressive application.

Installation

The easiest way to install this package is through composer:

$ composer require tobias/zend-expressive-hydrator-delegator

Configuration

In the general case where you are only using a single connection, it's enough to define the delegator factory for the HydratorManager:

return [
    'dependencies' => [
        'delegators' => [
            'HydratorManager' => [
                \Tobias\Expressive\Hydrator\HydratorManagerDelegatorFactory::class,
            ],
        ],
    ],
];

Using Expressive Config Manager

If you're using the Expressive Config Manager you can easily add the ConfigProvider class.

$configManager = new ConfigManager(
    [
        \Tobias\Expressive\Hydrator\ConfigProvider::class,
    ]
);