class HydratorPluginManager in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php \Zend\Hydrator\HydratorPluginManager
- 8.0 vendor/zendframework/zend-stdlib/src/Hydrator/HydratorPluginManager.php \Zend\Stdlib\Hydrator\HydratorPluginManager
Same name and namespace in other branches
- 8 vendor/zendframework/zend-hydrator/src/HydratorPluginManager.php \Zend\Hydrator\HydratorPluginManager
Plugin manager implementation for hydrators.
Enforces that adapters retrieved are instances of HydratorInterface
Hierarchy
- class \Zend\Hydrator\HydratorPluginManager extends \Zend\ServiceManager\AbstractPluginManager
Expanded class hierarchy of HydratorPluginManager
1 file declares its use of HydratorPluginManager
- HydratorPluginManager.php in vendor/
zendframework/ zend-stdlib/ src/ Hydrator/ HydratorPluginManager.php
File
- vendor/
zendframework/ zend-hydrator/ src/ HydratorPluginManager.php, line 19
Namespace
Zend\HydratorView source
class HydratorPluginManager extends AbstractPluginManager {
/**
* Whether or not to share by default
*
* @var bool
*/
protected $shareByDefault = false;
/**
* Default aliases
*
* @var array
*/
protected $aliases = [
'delegatinghydrator' => 'Zend\\Hydrator\\DelegatingHydrator',
];
/**
* Default set of adapters
*
* @var array
*/
protected $invokableClasses = [
'arrayserializable' => 'Zend\\Hydrator\\ArraySerializable',
'classmethods' => 'Zend\\Hydrator\\ClassMethods',
'objectproperty' => 'Zend\\Hydrator\\ObjectProperty',
'reflection' => 'Zend\\Hydrator\\Reflection',
];
/**
* Default factory-based adapters
*
* @var array
*/
protected $factories = [
'Zend\\Hydrator\\DelegatingHydrator' => 'Zend\\Hydrator\\DelegatingHydratorFactory',
];
/**
* {@inheritDoc}
*/
public function validatePlugin($plugin) {
if ($plugin instanceof HydratorInterface) {
// we're okay
return;
}
throw new Exception\RuntimeException(sprintf('Plugin of type %s is invalid; must implement Zend\\Hydrator\\HydratorInterface', is_object($plugin) ? get_class($plugin) : gettype($plugin)));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HydratorPluginManager:: |
protected | property | Default aliases | |
HydratorPluginManager:: |
protected | property | Default factory-based adapters | |
HydratorPluginManager:: |
protected | property | Default set of adapters | |
HydratorPluginManager:: |
protected | property | Whether or not to share by default | |
HydratorPluginManager:: |
public | function |