Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 61502e2

Browse files
committed
Override zend-hydrator plugins
Overrides the zend-hydrator plugins to use the extensions provided in this repository. This preserves the original typehints, allowing developers to gradually migrate by replacing zend-stdlib typehints with zend-hydrator typehints.
1 parent e0a88d2 commit 61502e2

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/Hydrator/HydratorPluginManager.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,33 @@
2020
*/
2121
class HydratorPluginManager extends BaseHydratorPluginManager
2222
{
23+
/**
24+
* Default aliases
25+
*
26+
* @var array
27+
*/
28+
protected $aliases = [
29+
'delegatinghydrator' => 'Zend\Stdlib\Hydrator\DelegatingHydrator',
30+
];
31+
32+
/**
33+
* Default set of adapters
34+
*
35+
* @var array
36+
*/
37+
protected $invokableClasses = [
38+
'arrayserializable' => 'Zend\Stdlib\Hydrator\ArraySerializable',
39+
'classmethods' => 'Zend\Stdlib\Hydrator\ClassMethods',
40+
'objectproperty' => 'Zend\Stdlib\Hydrator\ObjectProperty',
41+
'reflection' => 'Zend\Stdlib\Hydrator\Reflection'
42+
];
43+
44+
/**
45+
* Default factory-based adapters
46+
*
47+
* @var array
48+
*/
49+
protected $factories = [
50+
'Zend\Stdlib\Hydrator\DelegatingHydrator' => 'Zend\Stdlib\Hydrator\DelegatingHydratorFactory',
51+
];
2352
}

0 commit comments

Comments
 (0)