Google\Cloud\BigQuery\ValueMapper::objectToParameter PHP Method

objectToParameter() private method

private objectToParameter ( mixed $object ) : array
$object mixed The object to map.
return array
    private function objectToParameter($object)
    {
        if ($object instanceof ValueInterface) {
            return [['type' => $object->type()], ['value' => (string) $object]];
        }
        if ($object instanceof \DateTimeInterface) {
            return [['type' => self::TYPE_DATETIME], ['value' => $object->format(self::DATETIME_FORMAT)]];
        }
        if ($object instanceof Int64) {
            return [['type' => self::TYPE_INT64], ['value' => $object->get()]];
        }
        throw new \InvalidArgumentException(sprintf('Unrecognized object %s. Please ensure you are using the latest version of google/cloud.', get_class($object)));
    }