Zend\Stdlib\Hydrator\ClassMethods
Synopsis
class ClassMethods
extends AbstractHydrator
implements
HydratorOptionsInterface
{
- // members
- protected bool $underscoreSeparatedKeys;
- private FilterInterface $callableMethodFilter;
- // Inherited members from AbstractHydrator
- protected ArrayObject $strategies;
- protected NamingStrategyInterface $namingStrategy;
- protected FilterComposite $filterComposite;
- // methods
- public void __construct()
- public ClassMethods setOptions()
- public ClassMethods setUnderscoreSeparatedKeys()
- public bool getUnderscoreSeparatedKeys()
- public array extract()
- public hydrate()
- // Inherited methods from AbstractHydrator
- public void __construct()
- public StrategyInterface getStrategy()
- public bool hasStrategy()
- public HydratorInterface addStrategy()
- public HydratorInterface removeStrategy()
- public mixed extractValue()
- public mixed hydrateValue()
- public mixed extractName()
- public mixed hydrateName()
- public FilterComposite getFilter()
- public FilterComposite addFilter()
- public bool hasFilter()
- public FilterComposite removeFilter()
- public self setNamingStrategy()
- public NamingStrategyInterface getNamingStrategy()
- public bool hasNamingStrategy()
- public self removeNamingStrategy()
Hierarchy
Extends
Implements
Members
private
- $callableMethodFilter — \Zend\Stdlib\Hydrator\Filter\FilterInterface
protected
- $filterComposite
—
Zend\Stdlib\Hydrator\Filter\FilterComposite
Composite to filter the methods, that need to be hydrated - $namingStrategy
—
Zend\Stdlib\Hydrator\NamingStrategy\NamingStrategyInterface
An instance of NamingStrategyInterface - $strategies
—
ArrayObject
The list with strategies that this hydrator has. - $underscoreSeparatedKeys
—
Zend\Stdlib\Hydrator\bool
Flag defining whether array keys are underscore-separated (true) or camel case (false)
Methods
public
- __construct() — Define if extract values will use camel case or name with underscore
- extract() — Extract values from an object with class methods
- getUnderscoreSeparatedKeys()
- hydrate() — Hydrate an object by populating getter/setter methods
- setOptions()
- setUnderscoreSeparatedKeys()
Inherited from Zend\Stdlib\Hydrator\AbstractHydrator
public
- addFilter() — Add a new filter to take care of what needs to be hydrated.
- addStrategy() — Adds the given strategy under the given name.
- extractName() — Convert a name for extraction. If no naming strategy exists, the plain value is returned.
- extractValue() — Converts a value for extraction. If no strategy exists the plain value is returned.
- getFilter() — Get the filter instance
- getNamingStrategy() — Gets the naming strategy.
- getStrategy() — Gets the strategy with the given name.
- hasFilter() — Check whether a specific filter exists at key $name or not
- hasNamingStrategy() — Checks if a naming strategy exists.
- hasStrategy() — Checks if the strategy with the given name exists.
- hydrateName() — Converts a value for hydration. If no naming strategy exists, the plain value is returned.
- hydrateValue() — Converts a value for hydration. If no strategy exists the plain value is returned.
- removeFilter() — Remove a filter from the composition.
- removeNamingStrategy() — Removes the naming strategy
- removeStrategy() — Removes the strategy with the given name.
- setNamingStrategy() — Adds the given naming strategy