Class ClassMethods

Summary

Fully Qualified Name: Zend\Hydrator\ClassMethods
Extends: AbstractHydrator
Implements: HydratorOptionsInterface

Description

Methods

Name Description Defined By
__construct() Define if extract values will use camel case or name with underscore ClassMethods
addFilter() {@inheritDoc} ClassMethods
addStrategy() Adds the given strategy under the given name. AbstractHydrator
extract() Extract values from an object with class methods ClassMethods
extractName() Convert a name for extraction. If no naming strategy exists, the plain value is returned. AbstractHydrator
extractValue() Converts a value for extraction. If no strategy exists the plain value is returned. AbstractHydrator
getFilter() Get the filter instance AbstractHydrator
getMethodExistsCheck() ClassMethods
getNamingStrategy() Gets the naming strategy. AbstractHydrator
getStrategy() Gets the strategy with the given name. AbstractHydrator
getUnderscoreSeparatedKeys() ClassMethods
hasFilter() Check whether a specific filter exists at key $name or not AbstractHydrator
hasNamingStrategy() Checks if a naming strategy exists. AbstractHydrator
hasStrategy() Checks if the strategy with the given name exists. AbstractHydrator
hydrate() Hydrate an object by populating getter/setter methods ClassMethods
hydrateName() Converts a value for hydration. If no naming strategy exists, the plain value is returned. AbstractHydrator
hydrateValue() Converts a value for hydration. If no strategy exists the plain value is returned. AbstractHydrator
removeFilter() {@inheritDoc} ClassMethods
removeNamingStrategy() {@inheritDoc} ClassMethods
removeStrategy() Removes the strategy with the given name. AbstractHydrator
setMethodExistsCheck() ClassMethods
setNamingStrategy() {@inheritDoc} ClassMethods
setOptions() ClassMethods
setUnderscoreSeparatedKeys() ClassMethods

Method Details

__construct()

Define if extract values will use camel case or name with underscore

Parameter Name Type Description
$underscoreSeparatedKeys bool|array
$methodExistsCheck

Returns:

addFilter()

{@inheritDoc}

Parameter Name Type Description
$name
$filter
$condition

Returns:

addStrategy()

Adds the given strategy under the given name.

Parameter Name Type Description
$name string The
$strategy \Strategy\StrategyInterface The

Returns: \AbstractHydrator

extract()

Extract values from an object with class methods

Extracts the getter/setter of the given $object.

Parameter Name Type Description
$object object

Returns: array

extractName()

Convert a name for extraction. If no naming strategy exists, the plain value is returned.

Parameter Name Type Description
$name string The
$object null The

Returns: mixed

extractValue()

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

Parameter Name Type Description
$name string The
$value mixed The
$object mixed The

Returns: mixed

getFilter()

Get the filter instance

Returns: \Filter\FilterComposite

getMethodExistsCheck()

Returns: bool

getNamingStrategy()

Gets the naming strategy.

Returns: \NamingStrategy\NamingStrategyInterface

getStrategy()

Gets the strategy with the given name.

Parameter Name Type Description
$name string The

Returns: \Strategy\StrategyInterface

getUnderscoreSeparatedKeys()

Returns: bool

hasFilter()

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

Parameter Name Type Description
$name string Index

Returns: bool

hasNamingStrategy()

Checks if a naming strategy exists.

Returns: bool

hasStrategy()

Checks if the strategy with the given name exists.

Parameter Name Type Description
$name string The

Returns: bool

hydrate()

Hydrate an object by populating getter/setter methods

Hydrates an object by getter/setter methods of the object.

Parameter Name Type Description
$data array
$object object

Returns: object

hydrateName()

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

Parameter Name Type Description
$name string The
$data array The

Returns: mixed

hydrateValue()

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

Parameter Name Type Description
$name string The
$value mixed The
$data array The

Returns: mixed

removeFilter()

{@inheritDoc}

Parameter Name Type Description
$name

Returns:

removeNamingStrategy()

{@inheritDoc}

Returns:

removeStrategy()

Removes the strategy with the given name.

Parameter Name Type Description
$name string The

Returns: \HydratorInterface

setMethodExistsCheck()

Parameter Name Type Description
$methodExistsCheck bool

Returns: \ClassMethods

setNamingStrategy()

{@inheritDoc}

Parameter Name Type Description
$strategy

Returns:

setOptions()

Parameter Name Type Description
$options array|\Traversable

Returns: \ClassMethods

setUnderscoreSeparatedKeys()

Parameter Name Type Description
$underscoreSeparatedKeys bool

Returns: \ClassMethods

Top