Class

TRex\Annotation\Annotations

class Annotations extends Objects

Class Annotations.

Methods

__construct(mixed $data = null)

Constructor.

from Objects
IObjectsIterator getIterator()

Returns the current iterator.

from Objects
setIterator(IObjectsIterator $iterator)

Sets the current Iterator.

from Objects
mixed|null getByIndex(int $index)

Gets the value of the associate index.

from Objects
mixed|null first()

Gets the first value.

from Objects
mixed|null last()

Gets the last value.

from Objects
addFirst(mixed $value)

Adds values at the beginning of the list.

from Objects
addLast(mixed $value)

Adds values at the end of the list.

from Objects
removeFirst()

Removes first value of the list.

from Objects
removeLast()

Removes last value of the list.

from Objects
Annotation get(string $tag)

{@inheritDoc}

Details

in Objects at line 43
public __construct(mixed $data = null)

Constructor.

$data is initial data to set in the object. Keys are property names, and values are initial property values. $data could be a JSON string, an array or an array castable object.

Parameters

mixed $data

in Objects at line 53
public IObjectsIterator getIterator()

Returns the current iterator.

Return Value

IObjectsIterator

in Objects at line 63
public setIterator(IObjectsIterator $iterator)

Sets the current Iterator.

Parameters

IObjectsIterator $iterator

in Objects at line 74
public mixed|null getByIndex(int $index)

Gets the value of the associate index.

$index can be specified even the keys are associative. If the index is 0, the method will return the first value, ... If the index is -1, the method will return the last value, ...

Parameters

int $index

Return Value

mixed|null

in Objects at line 89
public mixed|null first()

Gets the first value.

Return Value

mixed|null

in Objects at line 103
public mixed|null last()

Gets the last value.

Return Value

mixed|null

in Objects at line 117
public addFirst(mixed $value)

Adds values at the beginning of the list.

Parameters

mixed $value

in Objects at line 131
public addLast(mixed $value)

Adds values at the end of the list.

Parameters

mixed $value

in Objects at line 141
public removeFirst()

Removes first value of the list.

in Objects at line 151
public removeLast()

Removes last value of the list.

at line 20
public Annotation get(string $tag)

{@inheritDoc}

Parameters

string $tag

Return Value

Annotation