Category

Extends \NextEvent\PHPSDK\Model\Model

Category model

Struct for a category record assigned to an order/basket item.

package

NextEvent\PHPSDK\Model

Methods

Supports getX or hasX Methods for properties which are yet unknown.

__call(string $name, array $args) : mixed
inherited

If the source of your model contains, e.g. a property named 'my_property', you can call getMyProperty() to retrieve it's value.

Arguments

$name

string

$args

array

Response

mixed

Model constructor

__construct(array $source) 
inherited

Parse source data.

Throws
\NextEvent\PHPSDK\Exception\InvalidModelDataException

Arguments

$source

array

The source data as received from the API

Get the value for the given variable.

get(string $var) : mixed
inherited

Should be used, if you expect the model to have custom properties which are not known/covered by the known getters

Arguments

$var

string

Response

mixed

Get the currently available items

getAvailableItems() : integer|null

Reflects the categories capacity minus all blocked and sold items

Response

integer|null

Get the category capacity

getCapacity() : integer|null

Response

integer|null

Get the changed date of this category

getChangedDate() : \NextEvent\PHPSDK\Model\DateTime|null

Get the creation data of this category

getCreatedDate() : \NextEvent\PHPSDK\Model\DateTime|null

Get the date/time value of this category

getDate() : \NextEvent\PHPSDK\Model\DateTime|null

Please note that multiple categories can return the same date/time value. In order to get a list of event dates, check for duplicates or use array_unique().

Response

\NextEvent\PHPSDK\Model\DateTime|null

Get the display name of this category

getDisplayname() : string

Use this in listing, checkout summary or invoices

Response

string

Get the event identifier this category belongs to

getEventId() : string

Response

string

Get the name of the event this category belongs to

getEventTitle() : string|null

Response

string|null

Get the unique identifier for this category

getId() : integer

Response

integer

Get the title/name of this category

getTitle() : string

Response

string

Getter for the deleted flag

isDeleted() : boolean

Denotes that the category has been deleted and is no longer available for booking.

Response

boolean

True if this category has been deleted

Check model state if it is valid

isValid() : boolean
inherited abstract

Response

boolean

String representation of object

serialize() : string
inherited

Implements Serializable interface

Response

string

Convert model to an Array

toArray() : array
inherited

Response

array

Convert the model for logging

toLogContext() : array
inherited

Implements the LogContextInterface interface

Response

array

Represent the model as string

toString() : string
inherited

Response

string

Constructs the object from a string

unserialize( $serialized) 
inherited

Implements Serializable interface

Arguments

$serialized