eZ\Publish\Core\REST\Common\Output\Generator\Json\FieldTypeHashGenerator::generateHashArray PHP Method

generateHashArray() protected method

Generates a JSON object from the given $hashArray with $parent.
protected generateHashArray ( ArrayObject | Object $parent, array $hashArray ) : Object
$parent ArrayObject | Object
$hashArray array
return Object
    protected function generateHashArray($parent, array $hashArray)
    {
        $object = new Object($parent);
        foreach ($hashArray as $hashKey => $hashItem) {
            $object->{$hashKey} = $this->generateValue($object, $hashItem);
        }
        return $object;
    }