\K_Source

Monster source.

Represents an object from the table 'k_source'.

Summary

Methods
Properties
Constants
__construct()
get_image()
$db
$id
$name
$description
$farmable
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 — Unit identifier.

$name

$name : string

Type

string — Source name.

$description

$description : string

Type

string — Source description.

$farmable

$farmable : boolean

Type

boolean — Indicates if the source is farmable.

Methods

__construct()

__construct(resource  $db, integer  $id) 

Constructor.

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

Parameters

resource $db

Connection to the database.

integer $id

Monster identifier.

get_image()

get_image() : string

Gets the path to the source image. The image must be in the img/source/ directory, and it's name must be the source id, padded with '0' to 4 digits, and the extension must be '.png'.

Returns

string —

Image URL, or a fixed unknown image.