public function Reflection::extract in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-hydrator/src/Reflection.php \Zend\Hydrator\Reflection::extract()
Extract values from an object
Parameters
object $object:
Return value
array
Overrides ExtractionInterface::extract
File
- vendor/
zendframework/ zend-hydrator/ src/ Reflection.php, line 29
Class
Namespace
Zend\HydratorCode
public function extract($object) {
$result = [];
foreach (self::getReflProperties($object) as $property) {
$propertyName = $this
->extractName($property
->getName(), $object);
if (!$this->filterComposite
->filter($propertyName)) {
continue;
}
$value = $property
->getValue($object);
$result[$propertyName] = $this
->extractValue($propertyName, $value, $object);
}
return $result;
}