Server
Class · Sharkord\Models\Server
Class Server
Represents the server environment and its settings.
Methods
Section titled “Methods”__construct()
Section titled “__construct()”Server constructor.
Parameters
| Parameter | Type | Description |
|---|---|---|
$sharkord | Sharkord | Reference to the main bot instance. |
$rawData | array | The raw array of data from the API. |
static fromArray()
Section titled “static fromArray()”Factory method to create a Server from raw API data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$raw | array | |
$sharkord | Sharkord |
Returns self
toArray()
Section titled “toArray()”Returns all the attributes as an array. Perfect for debugging!
Returns array
__isset()
Section titled “__isset()”Magic isset check. Allows isset() and empty() to work correctly against both stored attributes and virtual relational properties.
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string | Property name. |
Returns bool
__get()
Section titled “__get()”Magic getter. Triggered whenever you try to access a property that isn’t explicitly defined.
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string | Property name. |
Returns mixed