Represents a Blob value.

Blobs can be used to store binary across data various Google Cloud services.

Example:

use Google\Cloud\Core\Blob;

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

echo (string) $blob;
CloneableInstantiable
Methods
public __construct( $value)
 

Create a blob

    public __toString()
     

    Cast the blob to a string

    • access private
    • return string
    public get()
     

    Get the blob contents as a stream

    Example:

    $value = $blob->get();
    
    • return StreamInterface
    Properties
    private $value
     
    • var mixed
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only