protected function normalizeAsAttributes($object) : array
    {
        if (is_null($object)) {
            return $this->nullObjectAttributes();
        }

        $attributesMap = $this->getAttributesDictionnary();

        $wrapper = $this->factory->make($object);

        $normalizedAttributes = [];

        foreach ($attributesMap as $embedKey => $parentKey) {
            $normalizedAttributes[$parentKey] = $wrapper->getEntityAttribute($embedKey);
        }

        return $normalizedAttributes;
    }
protected function normalizeAsAttributes($object) : array
    {
        if (is_null($object)) {
            return $this->nullObjectAttributes();
        }

        $attributesMap = $this->getAttributesDictionnary();

        $wrapper = $this->factory->make($object);

        $normalizedAttributes = [];

        foreach ($attributesMap as $embedKey => $parentKey) {
            $normalizedAttributes[$parentKey] = $wrapper->getEntityAttribute($embedKey);
        }

        return $normalizedAttributes;
    }
protected function normalizeAsAttributes ( $ object ) : array { if ( is_null ( $ object ) ) { return $ this -> nullObjectAttributes ( ) ; } $ attributesMap = $ this -> getAttributesDictionnary ( ) ; $ wrapper = $ this -> factory -> make ( $ object ) ; $ normalizedAttributes = [ ] ; foreach ( $ attributesMap as $ embedKey => $ parentKey ) { $ normalizedAttributes [ $ parentKey ] = $ wrapper -> getEntityAttribute ( $ embedKey ) ; } return $ normalizedAttributes ; }
Normalize object as parent's attributes.

@param mixed $object

@return array
Normalize object as parent s attributes .