Properties

$version

$version : 

Version & Release date

Type

$versionName

$versionName : 

Version & Release date

Type

$versionReleased

$versionReleased : 

Version & Release date

Type

$debug

$debug : 

Debugging Mode

Type

$installed

$installed : 

Whether Lobby is installed

Type

$statuses

$statuses : 

Array that hold the functions to determine state of Lobby

Type

$cli

$cli : 

Whether Lobby is in CLI (Command Line Interface) mode

Type

$progress

$progress : 

cURL Progress callback should be inserted to here

Type

$url

$url : 

Base URL

Type

$host

$host : 

Host 127.0.0.1:8000, localhost:9000

Type

$hostname

$hostname : 

hostname = Host without port 127.0.0.1, localhost

Type

$lid

$lid : 

The Lobby Public ID

Type

$sysInfo

$sysInfo : 

Information about system Lobby is installed in

Type

$config

$config : 

Default Config

Type

$status

$status : 

Store the current state of Lobby

Type

Methods

__constructStatic()

__constructStatic() 

Set up

config()

config(boolean  $db = false) 

Reads configuration & set Lobby according to it

Parameters

boolean $db

Whether database config should only be returned

getConfig()

getConfig(string  $key, string  $subKey = null) : mixed

Get the config value of a key

Parameters

string $key

The config key

string $subKey

The sub config key

Returns

mixed —

The config value

getVersion()

getVersion(boolean  $codename = false) : string

Return the version string of Lobby

Parameters

boolean $codename

Whether release name (Berly) should also be included

Returns

string —

Lobby version

log()

log(string  $msg = null, string  $file = "lobby.log") : boolean

Log messages to a log file

Parameters

string $msg

The message to log

string $file

Log file path relative to 'contents/extra'

Returns

boolean —

Returns false if debugging is disabled

getURL()

getURL() 

Get/Make the Lobby base URL

getHost()

getHost() : string

Get the host with the port (127.0.0.1:2020, localhost).

If the port is '80', it won't be included in the return value

Returns

string —

Host where Lobby is running

getHostname()

getHostname() : string

Get the hostname (without the port)

Returns

string —

Hostname

fatalErrorHandler()

fatalErrorHandler() 

A handler for Fatal Errors occured in PHP

getSysInfo()

getSysInfo(string  $key = null) : string

Get info about the system Lobby is running in

Parameters

string $key

Returns

string —

The config value

status()

status(string  $val) : boolean

Check the status of Lobby

Parameters

string $val

The status to match against

Returns

boolean —

Whether $val matches the current Lobby status

l()

l(string  $url = null, string  $text = null, string  $extra = null) : string

Make a hyperlink

Parameters

string $url

The URL

string $text

Inner content of hyperlink

string $extra

Extra code to be inserted before <a is closed

Returns

string —

The hyperlink code

u()

u(string  $path = null, string  $relative = false) : \Type

Make a Lobby URL from relative path

Parameters

string $path

The relative path

string $relative

Returns

\Type —

Description

curPage()

curPage(boolean  $page = false, boolean  $full = false) : string

Get the path of current URL.

To get the last part only ("install" in "/folder/subfolder/admin/install), pass TRUE to $page

Parameters

boolean $page

Whether only the last pagename of URL should be returned.

boolean $full

Whether query part of URL should be included

Returns

string —

Pathname

getLID()

getLID() 

Get the public Lobby ID

isAvailable()

isAvailable() 

Check if updates are available

isCoreAvailable()

isCoreAvailable() 

isAppsAvailable()

isAppsAvailable() 

getApps()

getApps() 

zipFile()

zipFile(  $url,   $zipFile) 

Get the Zip File from Server & return back the downloaded file location

Parameters

$url
$zipFile

software()

software() 

Update The Lobby Core (Software)

finish_software_update()

finish_software_update(  $admin_previously_installed = false) 

Parameters

$admin_previously_installed

app()

app(  $id) 

Update the App with the given ID

Parameters

$id

sysInfo()

sysInfo() 

Load System Info into self::$sysInfo