class GeneratedImage implements Stringable, Arrayable, JsonSerializable

Traits

Properties

protected string|null $randomStorageName

The cached copy of the file's random name.

from  Storable
string|null $mime

Methods

string|false
store(string $path = '', UnitEnum|string|null $disk = null, array $options = [])

Store the file on a filesystem disk.

from  Storable
string|false
storePublicly(string $path = '', UnitEnum|string|null $disk = null, array $options = [])

Store the file on a filesystem disk with public visibility.

from  Storable
string|false
storePubliclyAs(string $path, string|null $name = null, UnitEnum|string|null $disk = null, array $options = [])

Store the file on a filesystem disk with public visibility.

from  Storable
string|false
storeAs(string $path, string|null $name = null, UnitEnum|string|null $disk = null, array $options = [])

Store the file on a filesystem disk.

from  Storable
__construct(string $image, string|null $mimeType = null)

Create a generated image.

string
mime()

Get the image's MIME type, falling back to a sensible default.

string
randomStorageName()

Get a default filename for the file.

string
content()

Get the raw string content of the image.

array
toArray()

Get the instance as an array.

array
jsonSerialize()

Get the JSON serializable representation of the instance.

string
__toString()

Get the raw string content of the image.

Details

in Storable at line 21
string|false store(string $path = '', UnitEnum|string|null $disk = null, array $options = [])

Store the file on a filesystem disk.

Parameters

string $path
UnitEnum|string|null $disk
array $options

Return Value

string|false

in Storable at line 29
string|false storePublicly(string $path = '', UnitEnum|string|null $disk = null, array $options = [])

Store the file on a filesystem disk with public visibility.

Parameters

string $path
UnitEnum|string|null $disk
array $options

Return Value

string|false

in Storable at line 39
string|false storePubliclyAs(string $path, string|null $name = null, UnitEnum|string|null $disk = null, array $options = [])

Store the file on a filesystem disk with public visibility.

Parameters

string $path
string|null $name
UnitEnum|string|null $disk
array $options

Return Value

string|false

in Storable at line 53
string|false storeAs(string $path, string|null $name = null, UnitEnum|string|null $disk = null, array $options = [])

Store the file on a filesystem disk.

Parameters

string $path
string|null $name
UnitEnum|string|null $disk
array $options

Return Value

string|false

at line 24
__construct(string $image, string|null $mimeType = null)

Create a generated image.

Parameters

string $image

the Base64 representation of the image

string|null $mimeType

at line 34
string mime()

Get the image's MIME type, falling back to a sensible default.

Return Value

string

at line 42
protected string randomStorageName()

Get a default filename for the file.

Return Value

string

at line 55
string content()

Get the raw string content of the image.

Return Value

string

at line 63
array toArray()

Get the instance as an array.

Return Value

array

at line 74
array jsonSerialize()

Get the JSON serializable representation of the instance.

Return Value

array

at line 82
string __toString()

Get the raw string content of the image.

Return Value

string