PHP 클래스 Elgg\Application

To run as PHP CLI server: php -S localhost:8888 /full/path/to/elgg/index.php The full path is necessary to work around this: https://bugs.php.net/bug.php?id=55726
부터: 2.0.0
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$_instance Application Reference to the loaded Application returned by elgg()

공개 메소드들

메소드 설명
__construct ( ServiceProvider $services ) Constructor
__get ( string $name ) : mixed Get an undefined property
bootCore ( ) : void Bootstrap the Elgg engine, loads plugins, and calls initial system events
elggDir ( ) : Elgg\Filesystem\Directory Returns a directory that points to the root of Elgg, but not necessarily the install root. See self::root() for that.
getDataPath ( ) : string Determine the Elgg data directory with trailing slash, save it to config, and return it
getDb ( ) : Database Get a Database wrapper for performing queries without booting Elgg
index ( ) : boolean Elgg's front controller. Handles basically all incoming URL requests.
install ( ) : void Renders a web UI for installing Elgg.
isTestingApplication ( ) : boolean Checks if the application is running in PHPUnit
loadCore ( ) : void Load all Elgg procedural code and wire up boot events, but don't boot
loadSettings ( ) : void Load settings.php
run ( ) : boolean Routes the request, booting core if not yet booted
setTestingApplication ( boolean $testing = true ) : void Flag this application as running for testing (PHPUnit)
start ( ) : self Start and boot the core
upgrade ( ) : void Elgg upgrade script.

비공개 메소드들

메소드 설명
allowPathRewrite ( ) : void Allow plugins to rewrite the path.
create ( ) : self Creates a new, trivial instance of Elgg\Application and set it as the singleton instance.
setupPath ( ) : string Get the request URI and store it in $_GET['__elgg_uri']

메소드 상세

__construct() 공개 메소드

Upon construction, no actions are taken to load or boot Elgg.
public __construct ( ServiceProvider $services )
$services Elgg\Di\ServiceProvider Elgg services provider

__get() 공개 메소드

Get an undefined property
public __get ( string $name ) : mixed
$name string The property name accessed
리턴 mixed

bootCore() 공개 메소드

This method loads the full Elgg engine, checks the installation state, and triggers a series of events to finish booting Elgg: - {@elgg_event boot system} - {@elgg_event init system} - {@elgg_event ready system} If Elgg is not fully installed, the browser will be redirected to an installation page.
public bootCore ( ) : void
리턴 void

elggDir() 공개 정적인 메소드

Returns a directory that points to the root of Elgg, but not necessarily the install root. See self::root() for that.
public static elggDir ( ) : Elgg\Filesystem\Directory
리턴 Elgg\Filesystem\Directory

getDataPath() 공개 정적인 메소드

Determine the Elgg data directory with trailing slash, save it to config, and return it
public static getDataPath ( ) : string
리턴 string

getDb() 공개 메소드

If settings.php has not been loaded, it will be loaded to configure the DB connection.
public getDb ( ) : Database
리턴 Elgg\Application\Database

index() 공개 정적인 메소드

Elgg's front controller. Handles basically all incoming URL requests.
public static index ( ) : boolean
리턴 boolean True if Elgg will handle the request, false if the server should (PHP-CLI server)

install() 공개 정적인 메소드

Renders a web UI for installing Elgg.
public static install ( ) : void
리턴 void

isTestingApplication() 공개 정적인 메소드

Checks if the application is running in PHPUnit
public static isTestingApplication ( ) : boolean
리턴 boolean

loadCore() 공개 메소드

This is used for internal testing purposes
public loadCore ( ) : void
리턴 void

loadSettings() 공개 메소드

This is done automatically during the boot process or before requesting a database object
또한 보기: Config::loadSettingsFile
public loadSettings ( ) : void
리턴 void

run() 공개 메소드

Routes the request, booting core if not yet booted
public run ( ) : boolean
리턴 boolean False if Elgg wants the PHP CLI server to handle the request

setTestingApplication() 공개 정적인 메소드

Flag this application as running for testing (PHPUnit)
public static setTestingApplication ( boolean $testing = true ) : void
$testing boolean Is testing application
리턴 void

start() 공개 정적인 메소드

Start and boot the core
public static start ( ) : self
리턴 self

upgrade() 공개 정적인 메소드

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.
public static upgrade ( ) : void
리턴 void

프로퍼티 상세

$_instance 공개적으로 정적으로 프로퍼티

Reference to the loaded Application returned by elgg()
public static Application,elgg $_instance
리턴 Application