Gate

Extends \NextEvent\PHPSDK\Model\Model

Gate model

A gate represents an entity which is responsible for invalidating access codes. It can only invalidate those access codes whose category id matches one of the gate's category ids.

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 access from date for this gate

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

Get the access to date for this gate

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

Get a list of all categories which can be invalidated on this gate

getCategories() : array

Response

array

Get the changed date of this gate

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

Get the creation data of this gate

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

Get the deactivated date for this gate

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

Get the unique hash for this gate

getHash() : string

Response

string

Get the unique identifier for this gate

getId() : integer

Response

integer

Get the mode for this gate

getMode() : integer

Get the name for this gate

getName() : string

Response

string

Get the gate which replaces this gate.

getReplacedBy() : \NextEvent\PHPSDK\Model\Gate

Gate the gate which has been replaced by this gate

getReplacedGate() : \NextEvent\PHPSDK\Model\Gate

Whether transfering the qr code for this gate is allowed or not

isTransferAllowed() : boolean

Response

boolean

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

Constants

MODE_IN

MODE_IN

MODE_OUT

MODE_OUT

MODE_BOTH

MODE_BOTH