Cloud Datastore Client - Class Blob (1.32.0)

Reference documentation and code samples for the Cloud Datastore Client class Blob.

Represents a Blob value.

Blobs can be used to store binary data in Google Cloud Datastore.

Example:

use Google\Cloud\Datastore\DatastoreClient;

$datastore = new DatastoreClient();

$blob = $datastore->blob(file_get_contents(__DIR__ .'/family-photo.jpg'));
// Get the value of a blob by casting to a string.

echo (string) $blob;

Namespace

Google \ Cloud \ Datastore