class Annotation extends TimeEvent

A class that represents an Annotation resource.

Traits

Trait which provides helper methods for converting DateTime input formats.

Properties

protected DateTimeInterface $time from TimeEvent

Methods

__construct(string $description, array $options = [])

Create a new Annotation.

time()

Return the time of this event.

from TimeEvent
setTime(DateTimeInterface|int|float $time = null)

Set the time for this event.

from TimeEvent
addAttributes(array $attributes)

Attach attributes to this object.

addAttribute(string $attribute, mixed $value)

Attach a single attribute to this object.

array
attributes()

Return the list of attributes for this object.

string
description()

Return the description of this annotation.

Details

at line 41
__construct(string $description, array $options = [])

Create a new Annotation.

Parameters

string $description A user-supplied message describing the event.
array $options [optional] Configuration options.

 @type \DateTimeInterface|int|float $time The time of this event.

in TimeEvent at line 52
DateTimeInterface time()

Return the time of this event.

Return Value

DateTimeInterface

in TimeEvent at line 62
setTime(DateTimeInterface|int|float $time = null)

Set the time for this event.

Parameters

DateTimeInterface|int|float $time The time of this event.

in AttributeTrait at line 32
addAttributes(array $attributes)

Attach attributes to this object.

Parameters

array $attributes Attributes in the form of $attribute => $value

in AttributeTrait at line 45
addAttribute(string $attribute, mixed $value)

Attach a single attribute to this object.

Parameters

string $attribute The name of the attribute.
mixed $value The value of the attribute. Will be cast to a string

in AttributeTrait at line 55
array attributes()

Return the list of attributes for this object.

Return Value

array

at line 55
string description()

Return the description of this annotation.

Return Value

string