Event
class Event extends SchemaObject
Properties
| protected string | $type | from SchemaObject | |
| protected array<string, mixed> | $properties | from SchemaObject | |
| static protected array<class-string<static>, string> | $types | from SchemaObject |
Methods
Create a schema with an explicit or inferred type.
Set a schema property, coercing nested schema objects and dates.
Dynamically set the schema property named by the called method.
Normalize nested schemas and dates into their serialized values.
Resolve the schema.org type from the SchemaType attribute or the class name.
Set the event description.
Set the event attendance mode.
Set the event status.
Set the event location. A string is treated as the name of a physical place.
Details
in
SchemaObject at line 31
__construct(string|null $type = null)
Create a schema with an explicit or inferred type.
in
SchemaObject at line 39
SchemaObject
set(string $property, mixed $value)
Set a schema property, coercing nested schema objects and dates.
in
SchemaObject at line 49
SchemaObject
date(string $property, DateTimeInterface|string $date)
Set a date property using an ISO 8601 value.
in
SchemaObject at line 59
array
toArray()
Get the schema type and properties.
in
SchemaObject at line 69
array
toJsonLd()
Get the schema with its JSON-LD context.
in
SchemaObject at line 79
array
jsonSerialize()
Get the schema's JSON representation.
in
SchemaObject at line 89
SchemaObject
__call(string $method, array $parameters)
Dynamically set the schema property named by the called method.
in
SchemaObject at line 105
protected mixed
coerce(mixed $value)
Normalize nested schemas and dates into their serialized values.
in
SchemaObject at line 125
protected string
typeFromAttribute()
Resolve the schema.org type from the SchemaType attribute or the class name.
in
SchemaObject at line 142
static void
flushState()
Flush all static state.
at line 18
Event
description(string $description)
Set the event description.
at line 26
Event
doorTime(DateTimeInterface|string $doorTime)
Set the time admission begins.
at line 34
Event
endDate(DateTimeInterface|string $endDate)
Set the event end date.
at line 42
Event
eventAttendanceMode(EventAttendanceMode $mode)
Set the event attendance mode.
at line 50
Event
eventStatus(EventStatus $status)
Set the event status.
at line 60
Event
image(string|array $image)
Set the event images.
at line 68
Event
location(SchemaObject|string $location)
Set the event location. A string is treated as the name of a physical place.
at line 76
Event
name(string $name)
Set the event name.
at line 94
Event
organizer(Organization|Person $organizer)
Set the event organizer.
at line 104
Event
performer(Organization|Person|array $performer)
Set the event performers.
at line 112
Event
startDate(DateTimeInterface|string $startDate)
Set the event start date.