Spanner/src/ValueMapper.php
private function objectParam($value)
    {
        if ($value instanceof \stdClass) {
            throw new \InvalidArgumentException(
                'Values of type `\stdClass` are interpreted as structs and must define their types.'
            );
        }

        if ($value instanceof ValueInterface) {
            return [
                $this->typeObject($value->type()),
                $value->formatAsString()
            ];
        }

        if ($value instanceof Int64) {
            return [
                $this->typeObject(self::TYPE_INT64),
                $value->get()
            ];
        }

        throw new \InvalidArgumentException(sprintf(
            'Unrecognized value type %s. ' .
            'Please ensure you are using the latest version of google/cloud or google/cloud-spanner.',
            get_class($value)
        ));
    }
private function objectParam($value)
    {
        if ($value instanceof \stdClass) {
            throw new \InvalidArgumentException(
                'Values of type `\stdClass` are interpreted as structs and must define their types.'
            );
        }

        if ($value instanceof ValueInterface) {
            return [
                $this->typeObject($value->type()),
                $value->formatAsString()
            ];
        }

        if ($value instanceof Int64) {
            return [
                $this->typeObject(self::TYPE_INT64),
                $value->get()
            ];
        }

        throw new \InvalidArgumentException(sprintf(
            'Unrecognized value type %s. ' .
            'Please ensure you are using the latest version of google/cloud or google/cloud-spanner.',
            get_class($value)
        ));
    }
private function objectParam ( $ value ) { if ( $ value instanceof \ stdClass ) { throw new \ InvalidArgumentException ( 'Values of type `\stdClass` are interpreted as structs and must define their types.' ) ; } if ( $ value instanceof ValueInterface ) { return [ $ this -> typeObject ( $ value -> type ( ) ) , $ value -> formatAsString ( ) ] ; } if ( $ value instanceof Int64 ) { return [ $ this -> typeObject ( self :: TYPE_INT64 ) , $ value -> get ( ) ] ; } throw new \ InvalidArgumentException ( sprintf ( 'Unrecognized value type %s. ' . 'Please ensure you are using the latest version of google/cloud or google/cloud-spanner.' , get_class ( $ value ) ) ) ; }
Handle query parameter mappings for various types of objects.

@param mixed $value The parameter value.
@return [array, array] An array containing the value and type.
Handle query parameter mappings for various types of objects .