value = Utils::streamFor($value); } /** * Get the blob contents as a stream * * Example: * ``` * $value = $blob->get(); * ``` * * @return StreamInterface */ public function get() { return $this->value; } /** * Cast the blob to a string * * @access private * @return string */ public function __toString() { return (string) $this->value; } /** * Implement JsonSerializable by returning a base64 encoded string of the blob * * @return string * @access private */ #[\ReturnTypeWillChange] public function jsonSerialize() { return base64_encode((string) $this->value); } }