Class

eZ\Publish\Core\FieldType\Image\Value

class Value extends Value

Value for Image field type.

Properties

mixed $id Image id.
string|null $alternativeText The alternative image text (for example "Picture of an apple.").
string $fileName Display file name of the image.
int $fileSize Size of the image file.
string $uri The image's HTTP URI.
mixed $imageId External image ID (required by REST for now, see https://jira.ez.no/browse/EZP-20831).
string $inputUri Input image file URI.
int $width Original image width.
int $height Original image height.
string $path string$path@deprecated BC with 5.0 (EZP-20948). Equivalent to $id or $inputUri, depending on which one is set .

Methods

string __toString()

__construct(array $imageData = array())

Construct a new Value object.

static Value fromString(string $path)

Creates a value only from a file path.

int getFileSize()

Returns the image file size in byte.

__get($propertyName)

__set($propertyName, $propertyValue)

Details

at line 158
public string __toString()

Return Value

string

See also

\eZ\Publish\Core\FieldType\Value

at line 100
public __construct(array $imageData = array())

Construct a new Value object.

Parameters

array $imageData

at line 126
static public Value fromString(string $path)

Creates a value only from a file path.

Parameters

string $path

Return Value

Value

Exceptions

InvalidArgumentType

at line 150
public int getFileSize()

Returns the image file size in byte.

Return Value

int

at line 163
public __get($propertyName)

Parameters

$propertyName

at line 172
public __set($propertyName, $propertyValue)

Parameters

$propertyName
$propertyValue