BigQuery/src/ValueMapper.php
public function toBigQuery($value)
    {
        if ($value instanceof ValueInterface || $value instanceof Int64) {
            return (string) $value;
        }

        if ($value instanceof \DateTime) {
            return $value->format(self::DATETIME_FORMAT_INSERT);
        }

        if (is_array($value)) {
            foreach ($value as $key => $item) {
                $value[$key] = $this->toBigQuery($item);
            }

            return $value;
        }

        return $value;
    }
public function toBigQuery($value)
    {
        if ($value instanceof ValueInterface || $value instanceof Int64) {
            return (string) $value;
        }

        if ($value instanceof \DateTime) {
            return $value->format(self::DATETIME_FORMAT_INSERT);
        }

        if (is_array($value)) {
            foreach ($value as $key => $item) {
                $value[$key] = $this->toBigQuery($item);
            }

            return $value;
        }

        return $value;
    }
public function toBigQuery ( $ value ) { if ( $ value instanceof ValueInterface || $ value instanceof Int64 ) { return ( string ) $ value ; } if ( $ value instanceof \ DateTime ) { return $ value -> format ( self :: DATETIME_FORMAT_INSERT ) ; } if ( is_array ( $ value ) ) { foreach ( $ value as $ key => $ item ) { $ value [ $ key ] = $ this -> toBigQuery ( $ item ) ; } return $ value ; } return $ value ; }
Maps a user provided value to the expected BigQuery format.

@param mixed $value The value to map.
@return mixed
Maps a user provided value to the expected BigQuery format .