class SourceImage (View source)

Represents the metadata of an image.

Properties

string $organization
string $binaryHash
string $shortHash
string $hash
string $name
string $format
string $mimetype
int $size
int $width
int $height
array $userMetadata
DynamicMetadataInterface[] $dynamicMetadata
array $staticMetadata
DateTime $created
$link
bool $protected

Methods

__construct(string $organization, string $binaryHash, string $hash, string $name, string $format, mixed $mimetype, int $size, int $width, int $height, array $userMetadata, array $dynamicMetadata, array $staticMetadata, DateTime $created, string $link, string $shortHash = null, bool $protected = false)

Constructor.

static SourceImage
createFromDecodedJsonResponse(array $data)

Create a source image from the decoded JSON data.

static SourceImage
createFromJsonResponse(string $data)

Create a source image from the JSON data.

Details

__construct(string $organization, string $binaryHash, string $hash, string $name, string $format, mixed $mimetype, int $size, int $width, int $height, array $userMetadata, array $dynamicMetadata, array $staticMetadata, DateTime $created, string $link, string $shortHash = null, bool $protected = false)

Constructor.

Parameters

string $organization Organization
string $binaryHash

Binary hash

string $hash Hash
string $name

Original name

string $format Format
mixed $mimetype
int $size

File size in bytes

int $width

Width in pixels

int $height

Height in pixels

array $userMetadata

User metadata

array $dynamicMetadata

Dynamic metadata

array $staticMetadata
DateTime $created

Created at date

string $link

Link to the image

string $shortHash

The short hash

bool $protected

Is image protected

static SourceImage createFromDecodedJsonResponse(array $data)

Create a source image from the decoded JSON data.

Parameters

array $data

Return Value

SourceImage

static SourceImage createFromJsonResponse(string $data)

Create a source image from the JSON data.

Parameters

string $data

Return Value

SourceImage