\K_Area

An area.

Represents an object from the table 'k_area'.

Summary

Methods
Properties
Constants
__construct()
get_image()
$db
$id
$type
$name
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$db

$db : resource

Type

resource — Database connection.

$id

$id : integer

Type

integer — Area identifier (it may not be unique!).

$type

$type : integer

Type

integer — Area type.

$name

$name : string

Type

string — Area name.

Methods

__construct()

__construct(resource  $db, integer  $id, integer  $type) 

Constructor.

Searches the database and retrieves the information about the run, populating it and it's items.

Parameters

resource $db

Connection to the database.

integer $id

Area identifier.

integer $type

Area type (required).

get_image()

get_image(string  $stage = null) : string

Gets the path to the area image. The image must be in the img/area/ directory, and its name must be the area type id, padded with '0' to 9 digites, and the extension must be '.png'.

Parameters

string $stage

Stage number, for a better image in Cairos.

Returns

string —

Image URL, or a fixed unknown image.