Skip to content

Server

Class  ·  Sharkord\Models\Server

Class Server

Represents the server environment and its settings.

Server constructor.

Parameters

ParameterTypeDescription
$sharkordSharkordReference to the main bot instance.
$rawDataarrayThe raw array of data from the API.

Factory method to create a Server from raw API data.

Parameters

ParameterTypeDescription
$rawarray
$sharkordSharkord

Returns self


Returns all the attributes as an array. Perfect for debugging!

Returns array


Magic isset check. Allows isset() and empty() to work correctly against both stored attributes and virtual relational properties.

Parameters

ParameterTypeDescription
$namestringProperty name.

Returns bool


Magic getter. Triggered whenever you try to access a property that isn’t explicitly defined.

Parameters

ParameterTypeDescription
$namestringProperty name.

Returns mixed