Device model
A device entity represents a real world device. It holds information such as the device UUID, platform(os) and it's version and the device name. A device can also tell on which gate it is logged in and when it has been logged in the last time.
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
getGate() : \NextEvent\PHPSDK\Model\Gate
getGateId() : integer|null
integer|null
getId() : integer
integer
getLastLogin() : \NextEvent\PHPSDK\Model\DateTime|null
getName() : string
string
getPlatform() : string|null
string|null
getUUID() : string
string
getVersion() : string|null
string|null
isValid() : boolean
boolean
login(\NextEvent\PHPSDK\Model\Gate $gate) : \NextEvent\PHPSDK\Model\Device
Throws |
|
---|
\NextEvent\PHPSDK\Model\Device
logout() : \NextEvent\PHPSDK\Model\Device
Throws |
|
---|
\NextEvent\PHPSDK\Model\Device
serialize() : string
Implements Serializable interface
string
toArray() : array
array
toLogContext() : array
Implements the LogContextInterface interface
array
toString() : string
string
unserialize( $serialized)
Implements Serializable interface