Datastore/src/EntityMapper.php
private function convertArrayToEntityValue(array $value)
    {
        $excludes = $this->pluck(Entity::EXCLUDE_FROM_INDEXES, $value, false) ?: [];

        $properties = [];
        foreach ($value as $key => $val) {
            $properties[$key] = $this->valueObject(
                $val,
                in_array($key, $excludes)
            );
        }

        if (!$properties) {
            $properties = (object) $properties;
        }

        return [
            'entityValue' => [
                'properties' => $properties
            ]
        ];
    }
private function convertArrayToEntityValue(array $value)
    {
        $excludes = $this->pluck(Entity::EXCLUDE_FROM_INDEXES, $value, false) ?: [];

        $properties = [];
        foreach ($value as $key => $val) {
            $properties[$key] = $this->valueObject(
                $val,
                in_array($key, $excludes)
            );
        }

        if (!$properties) {
            $properties = (object) $properties;
        }

        return [
            'entityValue' => [
                'properties' => $properties
            ]
        ];
    }
private function convertArrayToEntityValue ( array $ value ) { $ excludes = $ this -> pluck ( Entity :: EXCLUDE_FROM_INDEXES , $ value , false ) ? : [ ] ; $ properties = [ ] ; foreach ( $ value as $ key => $ val ) { $ properties [ $ key ] = $ this -> valueObject ( $ val , in_array ( $ key , $ excludes ) ) ; } if ( ! $ properties ) { $ properties = ( object ) $ properties ; } return [ 'entityValue' => [ 'properties' => $ properties ] ] ; }
Convert an associative array to a datastore entityValue type

@param array $value The input array
@return array The entityValue property
Convert an associative array to a datastore entityValue type