\Runes_Page

Rune list 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
$runes
$custom_filters
No constants found
No protected methods found
No protected properties found
N/A
parse_filters()
build_custom_query()
build_query()
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 — Site 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.

$runes

$runes : array<mixed,\Rune>

Type

array<mixed,\Rune> — Runes to show. In this case, the monster member is not the id, but a monster instance.

$custom_filters

$custom_filters : array<mixed,\Filter>

Type

array<mixed,\Filter> — Custom filters for this page.

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.

build_custom_query()

build_custom_query(integer  $filter) : string

Builds the query to the rune table using the a custom filter.

Parameters

integer $filter

Custom filter ID.

Returns

string —

The query to be executed.

build_query()

build_query() : string

Builds the query to the rune table using the selected or default filters.

Returns

string —

The query to be executed.