Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Elgg\Application Class Reference

Public Member Functions

 __construct (ServiceProvider $services)
 Constructor. More...
 
 loadSettings ()
 Load settings.php. More...
 
 loadCore ()
 Load all Elgg procedural code and wire up boot events, but don't boot. More...
 
 bootCore ()
 Bootstrap the Elgg engine, loads plugins, and calls initial system events. More...
 
 getDb ()
 Get a Database wrapper for performing queries without booting Elgg. More...
 
 __get ($name)
 Get an undefined property. More...
 
 run ()
 Routes the request, booting core if not yet booted. More...
 

Static Public Member Functions

static start ()
 Replacement for loading engine/start.php. More...
 
static index ()
 Elgg's front controller. More...
 
static getDataPath ()
 Determine the Elgg data directory with trailing slash, save it to config, and return it. More...
 
static elggDir ()
 Returns a directory that points to the root of Elgg, but not necessarily the install root. More...
 
static install ()
 Renders a web UI for installing Elgg. More...
 
static upgrade ()
 Elgg upgrade script. More...
 

Public Attributes

const GET_PATH_KEY = '__elgg_uri'
 
const REWRITE_TEST_TOKEN = '__testing_rewrite'
 
const REWRITE_TEST_OUTPUT = 'success'
 

Static Public Attributes

static static $_instance
 Reference to the loaded Application returned by elgg() More...
 

Detailed Description

Definition at line 20 of file Application.php.

Constructor & Destructor Documentation

Elgg\Application::__construct ( ServiceProvider  $services)

Constructor.

Upon construction, no actions are taken to load or boot Elgg.

Parameters
ServiceProvider$servicesElgg services provider

The time with microseconds when the Elgg engine was started.

float

This was introduced in 2.0 in order to remove all internal non-API state from $CONFIG. This will be a breaking change, but frees us to refactor in 2.x without fear of plugins depending on $CONFIG.

private

Definition at line 65 of file Application.php.

Member Function Documentation

Elgg\Application::__get (   $name)

Get an undefined property.

Parameters
string$nameThe property name accessed
Returns
mixed

Definition at line 341 of file Application.php.

Elgg\Application::bootCore ( )

Bootstrap the Elgg engine, loads plugins, and calls initial system events.

This method loads the full Elgg engine, checks the installation state, and triggers a series of events to finish booting Elgg:

  • { boot system}
  • { init system}
  • { ready system}

If Elgg is not fully installed, the browser will be redirected to an installation page.

Returns
void

Definition at line 234 of file Application.php.

static Elgg\Application::elggDir ( )
static

Returns a directory that points to the root of Elgg, but not necessarily the install root.

See self::root() for that.

Returns
Directory

Definition at line 465 of file Application.php.

static Elgg\Application::getDataPath ( )
static

Determine the Elgg data directory with trailing slash, save it to config, and return it.

Returns
string
Exceptions
\InstallationException

Definition at line 442 of file Application.php.

Elgg\Application::getDb ( )

Get a Database wrapper for performing queries without booting Elgg.

If settings.php has not been loaded, it will be loaded to configure the DB connection.

Note
Do not type hint on , as this will fail in 3.0. If you must type hint, expect an .
Before boot, the Database instance will not yet be bound to a Logger.
Returns

Definition at line 329 of file Application.php.

static Elgg\Application::index ( )
static

Elgg's front controller.

Handles basically all incoming URL requests.

Returns
void

Definition at line 376 of file Application.php.

static Elgg\Application::install ( )
static

Renders a web UI for installing Elgg.

Returns
void

Definition at line 474 of file Application.php.

Elgg\Application::loadCore ( )

Load all Elgg procedural code and wire up boot events, but don't boot.

This is used for internal testing purposes

Returns
void private

Definition at line 114 of file Application.php.

Elgg\Application::loadSettings ( )

Load settings.php.

This is done automatically during the boot process or before requesting a database object

See Also
Config::loadSettingsFile
Returns
void

Definition at line 101 of file Application.php.

Elgg\Application::run ( )

Routes the request, booting core if not yet booted.

Returns
bool False if Elgg wants the PHP CLI server to handle the request

Definition at line 385 of file Application.php.

static Elgg\Application::start ( )
static

Replacement for loading engine/start.php.

Returns
self

Definition at line 215 of file Application.php.

static Elgg\Application::upgrade ( )
static

Elgg upgrade script.

This script triggers any necessary upgrades. If the site has been upgraded to the most recent version of the code, no upgrades are run but the caches are flushed.

Upgrades use a table {db_prefix}upgrade_lock as a mutex to prevent concurrent upgrades.

The URL to forward to after upgrades are complete can be specified by setting $_GET['forward'] to a relative URL.

Returns
void

Definition at line 495 of file Application.php.

Member Data Documentation

static Elgg\Application::$_instance
static

Reference to the loaded Application returned by elgg()

Definition at line 44 of file Application.php.

const Elgg\Application::GET_PATH_KEY = '__elgg_uri'

Definition at line 22 of file Application.php.

const Elgg\Application::REWRITE_TEST_OUTPUT = 'success'

Definition at line 24 of file Application.php.

const Elgg\Application::REWRITE_TEST_TOKEN = '__testing_rewrite'

Definition at line 23 of file Application.php.


The documentation for this class was generated from the following file: