Event model
Model class for an event record registered in NextEvent. Provides simplified access to event title, details, start/end dates, etc.
see | |
---|---|
package |
NextEvent\PHPSDK\Model |
__call(string $name, array $args) : mixed
If the source of your model contains, e.g. a property named 'my_property',
you can call getMyProperty()
to retrieve it's value.
string
array
mixed
__construct(array $source)
Parse source data.
Throws |
|
---|
array
The source data as received from the API
get(string $var) : mixed
Should be used, if you expect the model to have custom properties which are not known/covered by the known getters
string
mixed
getChangedDate() : \NextEvent\PHPSDK\Model\DateTime|null
getCreatedDate() : \NextEvent\PHPSDK\Model\DateTime|null
getDescription() : string
string
getEndDate() : \NextEvent\PHPSDK\Model\DateTime|null
getId() : string
string
getImage() : string|null
string|null
The image url as string (if set)
getLocation() : \NextEvent\PHPSDK\Model\Location|null
getOrganizer() : \NextEvent\PHPSDK\Model\Organization|null
getStartDate() : \NextEvent\PHPSDK\Model\DateTime|null
getState() : string
Tells whether the event is active for sale or in another pre or post sale state.
Possible values are: draft
, active
, closed
.
Note, that booking in draft
and closed
is only possible for admin of the event.
In addition the order process can only be completed if the basket has only tickets for active
events.
string
getTitle() : string
string
isNew() : boolean
inheritdoc | |
---|---|
boolean
isValid() : boolean
boolean
serialize() : string
Implements Serializable interface
string
setDescription(string $description) : \NextEvent\PHPSDK\Model\Event
setSource(array $source) : \NextEvent\PHPSDK\Model\MutableModel
access |
private |
---|
array
The source data as received from the API.
\NextEvent\PHPSDK\Model\MutableModel
setTitle(string $title) : \NextEvent\PHPSDK\Model\Event
spawn(array $data) : \NextEvent\PHPSDK\Model\Event
The resulting instance will be marked as a new event which has not been persisted via API.
array
\NextEvent\PHPSDK\Model\Event
toArray() : array
array
toLogContext() : array
Implements the LogContextInterface interface
array
toString() : string
string
unserialize( $serialized)
Implements Serializable interface