# SWDB

# \Building

A Building.

Represents an object from the table 'building'.

## Summary

Methods
Properties
Constants
__construct()
$db
$uid
$building
$gain
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/Building.php
Package
  Default
Class hierarchy
  \Entity
  \Building

## Tags

category | Entity

## Properties

### $db

    $db : resource

#### Type

resource — Database connection.

#

Inherited from
  \Entity

## Tags

None found

### $uid

    $uid : integer

#### Type

integer — Owner identifier.

#

## Tags

None found

### $building

    $building : \K_Building

#### Type

\K_Building — Base building.

#

## Tags

None found

### $gain

    $gain : integer

#### Type

integer — Gain per horu.

#

## Tags

None found

## Methods

### __construct()

    __construct(resource  $db, integer  $id)

Constructor.

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

#### Parameters

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

#

## Tags

None found

### Building.php