Skip to content

Class: Limbs

Saqib Razzaq edited this page Mar 18, 2019 · 5 revisions

Limbs class is responsible for holding some major components like Database, Settings and Twig for global access as well as communication between PHP and HTML.

initialize

Intializes required variables and makes ready for other methods

Examples
global $database;
$limbs = new Limbs($database);
$limbs->initialize();

getThemeSettings

Fetch all theme related settings

Returns

An array with all theme related settings

Examples
$limbs->getThemeSettings();

display

Displays a page

Parameters
[string] $page

Page name to be displayed

[array] $parameters

Parameters to be sent to HTML for accessing via Twig

Examples
$limbs->display('video.html', array('total' => 20));

displayErrorPage

Displays an error page

Parameters
[array] $parameters

An array of parameters to be accessed from HTML via Twig

[string] $message

An error message to display on page

Examples
$parameters = array();
$limbs->displayErrorPage($parameters, 'You must login before uploading');