class SubjectArea implements DynamicMetadataInterface (View source)

Properties

int $width
int $height
int $x
int $y
bool $percentage

Methods

__construct(int $x, int $y, int $width = 1, int $height = 1, bool $percentage = false)

SubjectArea constructor.

createFromDecodedJsonResponse(array $data)

Create a SubjectArea from the decoded JSON data.

static string
getName()

No description

mixed
getForJson()

Get the data, which should be json-fied later.

Details

__construct(int $x, int $y, int $width = 1, int $height = 1, bool $percentage = false)

SubjectArea constructor.

The SubjectArea can also be defined as a point, by setting both "width" and "height" to 1.

Parameters

int $x

X-point of the subject area, 0-based

int $y

Y-point of the subject area, 0-based

int $width

The width of the subject area box, default to 1px

int $height

The height of the subject area box, default to 1px

bool $percentage

If the parameters above are in percentage instead of pixels

Exceptions

InvalidArgumentException

static DynamicMetadataInterface createFromDecodedJsonResponse(array $data)

Create a SubjectArea from the decoded JSON data.

Parameters

array $data

Decoded JSON data

Return Value

DynamicMetadataInterface

static string getName()

No description

Return Value

string

The name of the metadata

mixed getForJson()

Get the data, which should be json-fied later.

Return Value

mixed