# SWDB

# \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

File
  application/entity/K_Area.php
Package
  Default
Class hierarchy
  \Entity
  \K_Area

## Tags

category | Entity

## Properties

### $db

    $db : resource

#### Type

resource — Database connection.

#

Inherited from
  \Entity

## Tags

None found

### $id

    $id : integer

#### Type

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

#

## Tags

None found

### $type

    $type : integer

#### Type

integer — Area type.

#

## Tags

None found

### $name

    $name : string

#### Type

string — Area name.

#

## Tags

None found

## 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).

#

## Tags

None found

### 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.

#

## Tags

None found

### K_Area.php