|
| __construct ($underscoreSeparatedKeys=true) |
| Define if extract values will use camel case or name with underscore.
|
|
| setOptions ($options) |
|
| setUnderscoreSeparatedKeys ($underscoreSeparatedKeys) |
|
| getUnderscoreSeparatedKeys () |
|
| extract ($object) |
| Extract values from an object with class methods.
|
|
| hydrate (array $data, $object) |
| Hydrate an object by populating getter/setter methods.
|
|
| addFilter ($name, $filter, $condition=Filter\FilterComposite::CONDITION_OR) |
| Add a new filter to take care of what needs to be hydrated.To exclude e.g. the method getServiceLocator: $composite->addFilter( "servicelocator", function ($property) { list($class, $method) = explode('::', $property); if ($method === 'getServiceLocator') { return false; } return true; }, FilterComposite::CONDITION_AND ); - Parameters
-
string | $name | Index in the composite |
callable | Filter\FilterInterface | $filter | |
int | $condition | |
- Returns
- Filter
|
|
| removeFilter ($name) |
| Remove a filter from the composition.To not extract "has" methods, you simply need to unregister it $filterComposite->removeFilter('has'); - Parameters
-
- Returns
- Filter
|
|
| setNamingStrategy (NamingStrategy\NamingStrategyInterface $strategy) |
| Adds the given naming strategy.- Parameters
-
NamingStrategy\NamingStrategyInterface | $strategy | The naming to register. |
- Returns
- self
|
|
| removeNamingStrategy () |
| Removes the naming with the given name.- Returns
- self
|
|
| __construct () |
| Initializes a new instance of this class.
|
|
| getStrategy ($name) |
| Gets the strategy with the given name.
|
|
| hasStrategy ($name) |
| Checks if the strategy with the given name exists.
|
|
| addStrategy ($name, Strategy\StrategyInterface $strategy) |
| Adds the given strategy under the given name.
|
|
| removeStrategy ($name) |
| Removes the strategy with the given name.
|
|
| extractValue ($name, $value, $object=null) |
| Converts a value for extraction.
|
|
| hydrateValue ($name, $value, $data=null) |
| Converts a value for hydration.
|
|
| extractName ($name, $object=null) |
| Convert a name for extraction.
|
|
| hydrateName ($name, $data=null) |
| Converts a value for hydration.
|
|
| getFilter () |
| Get the filter instance.
|
|
| addFilter ($name, $filter, $condition=Filter\FilterComposite::CONDITION_OR) |
| Add a new filter to take care of what needs to be hydrated.
|
|
| hasFilter ($name) |
| Check whether a specific filter exists at key $name or not.
|
|
| removeFilter ($name) |
| Remove a filter from the composition.
|
|
| setNamingStrategy (NamingStrategy\NamingStrategyInterface $strategy) |
| Adds the given naming strategy.
|
|
| getNamingStrategy () |
| Gets the naming strategy.
|
|
| hasNamingStrategy () |
| Checks if a naming strategy exists.
|
|
| removeNamingStrategy () |
| Removes the naming strategy.
|
|