1016. Class

1016.1. Zend\Stdlib\Hydrator\AbstractHydrator

1016.1.1. Methods

1016.1.1.1. __construct

__construct()

Initializes a new instance of this class.

1016.1.1.2. getStrategy

getStrategy()

Gets the strategy with the given name.

Parameters:string – The name of the strategy to get.
Return type:StrategyInterface

1016.1.1.3. hasStrategy

hasStrategy()

Checks if the strategy with the given name exists.

Parameters:string – The name of the strategy to check for.
Return type:bool

1016.1.1.4. addStrategy

addStrategy()

Adds the given strategy under the given name.

Parameters:
  • string – The name of the strategy to register.
  • StrategyInterface – The strategy to register.
Return type:

HydratorInterface

1016.1.1.5. removeStrategy

removeStrategy()

Removes the strategy with the given name.

Parameters:string – The name of the strategy to remove.
Return type:HydratorInterface

1016.1.1.6. extractValue

extractValue()

Converts a value for extraction. If no strategy exists the plain value is returned.

Parameters:
  • string – The name of the strategy to use.
  • mixed – The value that should be converted.
Return type:

mixed

1016.1.1.7. hydrateValue

hydrateValue()

Converts a value for hydration. If no strategy exists the plain value is returned.

Parameters:
  • string – The name of the strategy to use.
  • mixed – The value that should be converted.
Return type:

mixed

1016.1.1.8. getFilter

getFilter()

Get the filter instance

Return type:FilterFilterComposite

1016.1.1.9. addFilter

addFilter()

Add a new filter to take care of what needs to be hydrated. To exclude e.g. the method getServiceLocator:

<code> $composite->addFilter(“servicelocator”,

function($property) {

list($class, $method) = explode(‘::’, $property); if ($method === ‘getServiceLocator’) {

return false;

} return true;

}, FilterComposite::CONDITION_AND

); </code>

Parameters:
  • string – Index in the composite
  • callable|ZendStdlibHydratorFilterFilterInterface
  • int
Return type:

FilterFilterComposite

1016.1.1.10. hasFilter

hasFilter()

Check whether a specific filter exists at key $name or not

Parameters:string – Index in the composite
Return type:bool

1016.1.1.11. removeFilter

removeFilter()

Remove a filter from the composition. To not extract “has” methods, you simply need to unregister it

<code> $filterComposite->removeFilter(‘has’); </code>

Parameters:$name
Return type:FilterFilterComposite