# SWDB

# \K_Leader_Skill

Monster skill.

Represents an object from the table 'k_skill'.

## Summary

Methods
Properties
Constants
__construct()
get_image()
create_description()
$db
$id
$attribute
$amount
$area
$element
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_Leader_Skill.php
Package
  Default
Class hierarchy
  \Entity
  \K_Leader_Skill

## Tags

category | Entity

## Properties

### $db

    $db : resource

#### Type

resource — Database connection.

#

Inherited from
  \Entity

## Tags

None found

### $id

    $id : integer

#### Type

integer — Skill identifier.

#

## Tags

None found

### $attribute

    $attribute : integer

#### Type

integer — Skill attribute ID.

#

## Tags

None found

### $amount

    $amount : integer

#### Type

integer — Attribute increase amount.

#

## Tags

None found

### $area

    $area : integer

#### Type

integer — Effect area id.

#

## Tags

None found

### $element

    $element : integer

#### Type

integer — Affected element id.

#

## Tags

None found

## Methods

### __construct()

    __construct(resource  $db, integer  $id)

Constructor.

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

#### Parameters

resource | $db | Connection to the database.
integer | $id | Skill identifier.

#

## Tags

None found

### get_image()

    get_image() : string

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

#### Returns

string —

Image URL, or a fixed unknown image.

#

## Tags

None found

### create_description()

    create_description() : string

Composes a human readable description of the skill.

#### Returns

string —

The description.

#

## Tags

None found

### K_Leader_Skill.php