\Home_Page

Home page model.

Every visitable page type must inherit from this one.

Summary

Methods
Properties
Constants
__construct()
$db
$view
$title
$name
$description
$favicon
$icon
$canonical
$author
$filters
$uid
$level
$country
$experience
$rep
$defense
$currency
$building
$decoration
$inventory_scroll
$inventory_craft_rune
$inventory_craft
$inventory_essence
No constants found
No protected methods found
No protected properties found
N/A
parse_filters()
No private properties found
N/A

Properties

$db

$db : resource

Type

resource — Database connection.

$view

$view : string

Type

string — Path to the view associated with the page.

$title

$title : string

Type

string — Title of the page, in the defined language.

$name

$name : string

Type

string — Player name.

$description

$description : string

Type

string — Page description, in the defined language.

$favicon

$favicon : string

Type

string — URL to the site favicon.

$icon

$icon : string

Type

string — URL to the page icon or main image.

$canonical

$canonical : string

Type

string — Canonical URL.

$author

$author : string

Type

string — Autjhor URL.

$filters

$filters : array<mixed,mixed>

Type

array<mixed,mixed> — The filters the page can handle.

$uid

$uid : integer

Type

integer — Player ID.

$level

$level : integer

Type

integer — Player level.

$country

$country : string

Type

string — Player country (XX).

$experience

$experience : integer

Type

integer — Total experience.

$rep

$rep : \Unit

Type

\Unit — Representative Unit.

$defense

$defense : array<mixed,\Unit>

Type

array<mixed,\Unit> — Unitss in Arena defense.

$currency

$currency : array<mixed,integer>

Type

array<mixed,integer> — Currency.

$building

$building : array<mixed,\Building>

Type

array<mixed,\Building> — List of Buildings.

$decoration

$decoration : array<mixed,\Decoration>

Type

array<mixed,\Decoration> — List of Decorations.

$inventory_scroll

$inventory_scroll : array<mixed,\Inventory>

Type

array<mixed,\Inventory> — List of Scrolls in Inventory.

$inventory_craft_rune

$inventory_craft_rune : array<mixed,\Inventory>

Type

array<mixed,\Inventory> — List of rune crafting items in Inventory.

$inventory_craft

$inventory_craft : array<mixed,\Inventory>

Type

array<mixed,\Inventory> — List of rune crafting items in Inventory.

$inventory_essence

$inventory_essence : array<mixed,\Inventory>

Type

array<mixed,\Inventory> — List of rune crafting items in Inventory.

Methods

__construct()

__construct(resource  $db) 

Constructor.

Retrieves the data and initializes the variables.

Parameters

resource $db

Connection to the database.

parse_filters()

parse_filters() 

Parses the request looking for the selected filters, validates them and adds them to the $filters array.

Must be overriden in the page classes.