Functions
in package
Functions Class
Table of Contents
- chronoApplet() : string
- chronoApplet
- fleetSpeedFactor() : string
- fleetSpeedFactor
- generatePassword() : string
- Generate a random password
- getCurrentLanguage() : string
- getCurrentLanguage
- getDefaultVacationTime() : int
- getDefaultVacationTime
- getLanguages() : string
- getLanguages
- getLanguagesList() : array<string|int, mixed>
- Get the list of available languages
- getTemplate() : Template
- Return a new instance of Template
- hash() : string
- Encrypt a password
- isCurrentPlanet() : bool
- Check if it is the current planet
- isModuleAccesible() : array<string|int, mixed>
- isModuleAccesible
- loadLibrary() : bool
- loadLibrary
- message() : void
- message
- messageBox() : string
- Shows a message box
- model() : bool
- loadModel
- moduleMessage() : void
- moduleMessage
- readConfig() : string
- readConfig
- redirect() : void
- redirect
- sendEmail() : mixed
- Send and email
- sendMessage() : void
- sendMessage
- setCurrentLanguage() : void
- setCurrentLanguage
- setImage() : string
- setImage
- updateConfig() : string
- updateConfig
- validEmail() : string
- validEmail
Methods
chronoApplet()
chronoApplet
public
static chronoApplet(string $type, string $ref, string $value, bool $init) : string
Parameters
- $type : string
-
Type
- $ref : string
-
Ref
- $value : string
-
Value
- $init : bool
-
Init
Return values
string —fleetSpeedFactor()
fleetSpeedFactor
public
static fleetSpeedFactor() : string
Return values
string —generatePassword()
Generate a random password
public
static generatePassword() : string
Return values
string —getCurrentLanguage()
getCurrentLanguage
public
static getCurrentLanguage([mixed $installed = false ]) : string
Parameters
- $installed : mixed = false
Return values
string —getDefaultVacationTime()
getDefaultVacationTime
public
static getDefaultVacationTime() : int
Return values
int —getLanguages()
getLanguages
public
static getLanguages(string $current_lang) : string
Parameters
- $current_lang : string
-
Current language
Return values
string —getLanguagesList()
Get the list of available languages
public
static getLanguagesList() : array<string|int, mixed>
Return values
array<string|int, mixed> —getTemplate()
Return a new instance of Template
public
static getTemplate() : Template
Return values
Template —hash()
Encrypt a password
public
static hash(string $password) : string
Parameters
- $password : string
Return values
string —isCurrentPlanet()
Check if it is the current planet
public
static isCurrentPlanet(array<string|int, mixed> $current, array<string|int, mixed> $target) : bool
Parameters
- $current : array<string|int, mixed>
- $target : array<string|int, mixed>
Return values
bool —isModuleAccesible()
isModuleAccesible
public
static isModuleAccesible(int $module_id) : array<string|int, mixed>
Parameters
- $module_id : int
-
Module ID
Return values
array<string|int, mixed> —loadLibrary()
loadLibrary
public
static loadLibrary([string $library = '' ]) : bool
Parameters
- $library : string = ''
-
Library
Return values
bool —message()
message
public
static message(string $mes[, string $dest = '' ][, string $time = '3' ][, bool $topnav = false ][, bool $menu = true ][, bool $center = true ]) : void
Parameters
- $mes : string
-
Message
- $dest : string = ''
-
Redirect destination
- $time : string = '3'
-
Time to redirect
- $topnav : bool = false
-
Show top navigation
- $menu : bool = true
-
Show menu
- $center : bool = true
-
Center message
Return values
void —messageBox()
Shows a message box
public
static messageBox(string $title, string $message[, string $goto = '' ][, string $button = ' ok ' ][, bool $two_lines = false ]) : string
Parameters
- $title : string
-
Box Tittle
- $message : string
-
Box Message
- $goto : string = ''
-
Go to url
- $button : string = ' ok '
-
Button text
- $two_lines : bool = false
-
Set the message in two lines
Return values
string —model()
loadModel
public
static model([string $model = '' ]) : bool
Parameters
- $model : string = ''
-
Model
Return values
bool —moduleMessage()
moduleMessage
public
static moduleMessage(int $access_level) : void
Parameters
- $access_level : int
-
Access level
Return values
void —readConfig()
readConfig
public
static readConfig([string $config_name = '' ][, bool $all = false ]) : string
Parameters
- $config_name : string = ''
-
Config name
- $all : bool = false
-
All
Return values
string —redirect()
redirect
public
static redirect(string $route) : void
Parameters
- $route : string
-
Route
Return values
void —sendEmail()
Send and email
public
static sendEmail(string $to, string $subject, string $body, array<string|int, mixed> $from[, mixed $format = 'text' ][, mixed $headers = '' ]) : mixed
Parameters
- $to : string
-
Mail To
- $subject : string
-
Mail Subject
- $body : string
-
Mail Body
- $from : array<string|int, mixed>
-
Mail From
- $format : mixed = 'text'
- $headers : mixed = ''
-
Mail headers (optional)
Return values
mixed —sendMessage()
sendMessage
public
static sendMessage(int $to, int $sender[, int $time = '' ][, int $type = '' ][, string $from = '' ][, string $subject = '' ][, string $message = '' ][, bool $allowHtml = false ]) : void
Parameters
- $to : int
-
To
- $sender : int
-
Sender
- $time : int = ''
-
Time
- $type : int = ''
-
Type
- $from : string = ''
-
From
- $subject : string = ''
-
Subject
- $message : string = ''
-
Message
- $allowHtml : bool = false
-
Allow HTML
Return values
void —setCurrentLanguage()
setCurrentLanguage
public
static setCurrentLanguage([string $lang = '' ]) : void
Parameters
- $lang : string = ''
-
Language
Return values
void —setImage()
setImage
public
static setImage(string $path[, string $title = 'img' ][, string $attributes = '' ]) : string
Parameters
- $path : string
-
Image path
- $title : string = 'img'
-
Title
- $attributes : string = ''
-
Attributes - css & js
Return values
string —updateConfig()
updateConfig
public
static updateConfig(string $config_name, string $config_value) : string
Parameters
- $config_name : string
-
Config name
- $config_value : string
-
Config value
Return values
string —validEmail()
validEmail
public
static validEmail(string $address) : string
Parameters
- $address : string
-
Email address