Datastore/src/EntityMapper.php
private function convertArrayToArrayValue(array $value)
    {
        $values = [];
        foreach ($value as $val) {
            // ListValues may not contain nested ListValues.
            // Therefore, if an empty array is provided as part of an array,
            // we can encode it as an EntityValue.
            if (is_array($val) && empty($val)) {
                $val = (object) $val;
            }

            $values[] = $this->valueObject($val);
        }

        return [
            'arrayValue' => [
                'values' => $values
            ]
        ];
    }
private function convertArrayToArrayValue(array $value)
    {
        $values = [];
        foreach ($value as $val) {
            // ListValues may not contain nested ListValues.
            // Therefore, if an empty array is provided as part of an array,
            // we can encode it as an EntityValue.
            if (is_array($val) && empty($val)) {
                $val = (object) $val;
            }

            $values[] = $this->valueObject($val);
        }

        return [
            'arrayValue' => [
                'values' => $values
            ]
        ];
    }
private function convertArrayToArrayValue ( array $ value ) { $ values = [ ] ; foreach ( $ value as $ val ) { // ListValues may not contain nested ListValues. // Therefore, if an empty array is provided as part of an array, // we can encode it as an EntityValue. if ( is_array ( $ val ) && empty ( $ val ) ) { $ val = ( object ) $ val ; } $ values [ ] = $ this -> valueObject ( $ val ) ; } return [ 'arrayValue' => [ 'values' => $ values ] ] ; }
Convert a non-associative array to a datastore arrayValue type

@param array $value The input array
@return array The arrayValue property
Convert a non - associative array to a datastore arrayValue type