BaseCategory model
Provides the structure for a base category record.
Base categories are categories which can not be booked and are never linked to an order item. Base categories are internally used to create category records. All values which are set for a base category will automatically be applied to the related category records.
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
getBasePrices() : \NextEvent\PHPSDK\Model\Collection
getCapacity() : integer|null
This value could be useless if individual capacities have been set for single categories.
integer|null
getChangedDate() : \NextEvent\PHPSDK\Model\DateTime|null
getCreatedDate() : \NextEvent\PHPSDK\Model\DateTime|null
getDisplayname() : string|null
Use this in listing, checkout summary or invoices
string|null
getEventId() : string
string
getId() : integer
integer
getTitle() : string
string
isNew() : boolean
inheritdoc | |
---|---|
boolean
isValid() : boolean
boolean
serialize() : string
Implements Serializable interface
string
setBasePrices(\NextEvent\PHPSDK\Model\Collection $basePrices) : void
setRestClient(\NextEvent\PHPSDK\Rest\Client $restClient) : \NextEvent\PHPSDK\Model\BasePrice
setSource(array $source) : \NextEvent\PHPSDK\Model\MutableModel
access |
private |
---|
array
The source data as received from the API.
\NextEvent\PHPSDK\Model\MutableModel
setTitle( $title) : \NextEvent\PHPSDK\Model\BaseCategory
spawn(array $data) : \NextEvent\PHPSDK\Model\BaseCategory
The resulting instance will be marked as a new base category which has not been persisted via API.
The created category will also get an empty base price collection assigned. This way, you to not have to do it yourself and can just push your prices into the collection.
Use this method if you want to create a new base category and persist it via the client.
array
\NextEvent\PHPSDK\Model\BaseCategory
toArray() : array
array
toLogContext() : array
Implements the LogContextInterface interface
array
toString() : string
string
unserialize( $serialized)
Implements Serializable interface