class Ignition

Zentrale Startup-Klasse für Anwendungen

Die Aufgabe der Ignition-Klasse ist das Laden und Einrichten von Biblotheken und Umgebungsvariablen.

Hinweis

* IN DIESER KLASSE SIND DAS FRAMEWORK UND DIE KOMPONENTEN NOCH NICHT VERFÜGBAR!
* ES DÜRFEN DESHALB KEINE FUNKTIONEN DARAUS VERWENDET WERDEN.

Constants

INI_SYSTEM_FILE

Name der system.ini

INI_ASSEMBLY_FILE

PLATFORM-FILE

INI_KEY_FILESYSTEM

Schlüssel für die Dateien

INI_KEY_COMPONENTS

Schlüssel für Komponenten

INI_KEY_COMPONENT

Schlüssel für Komponenten

INI_KEY_ADDITIONAL_COMPONENTS

Schlüssel für zusätzliche Komponenten

INI_KEY_ADDITIONAL_COMPONENT

INI_KEY_ADDITIONAL_COMPONENT

INI_KEY_UNITS

Schlüssel für Komponenten

BASEPATH

Hier liegt das Standardsystem (readonly)

VENDORPATH

Phar-Archive, externe Bibliotheken

TEMPPATH

Temporäre Dateien

DATAPATH

Kunden- und Projektspezifische Dateien

LOGPATH

Logging und Debugging

CONFIGPATH

Konfigurationsdateien (Routen, Zugangsdaten)

CUSTOMISATIONPATH

Kunden- und projektspezifischer Code

WEBPATH

über HTTP aufrufbare Dateien

SAPI_KEY_HTTP

HTTP-Schnittstellen-Wert für Konfiguration

SAPI_KEY_CLI

CLI-Schnittstellen-Wert für Konfiguration

SAPI_HTTP

HTTP-Schnittstelle

SAPI_CLI

CLI-Schnittstelle

LINEFEED

Zeilenumbruch

CARRIAGERETURN

Zeilenumbruch

Properties

static protected Ignition $instance
protected array $iniData
protected boolean|null $returnValue
protected integer $exitValue
protected string $hash
protected string $sapiName
protected integer $sapiType
protected array $headers
protected string $httpStatus
protected array $assemblyIniData
protected array $systemIniData
protected boolean $tputSupport
protected string $bold
protected string $colorBlack
protected string $colorRed
protected string $colorGreen
protected string $colorYellow
protected string $colorBlue
protected string $colorPurple
protected string $colorCyan
protected string $colorWhite
protected string $backgroundColorBlack
protected string $backgroundColorRed
protected string $backgroundColorGreen
protected string $backgroundColorYellow
protected string $backgroundColorBlue
protected string $backgroundColorPurple
protected string $backgroundColorCyan
protected string $backgroundColorWhite
protected string $underline
protected string $dimMode
protected string $resetUnderline
protected string $reset
protected string $name
protected integer $columns
protected integer $lines
protected string $environmentConfigKey

Methods

initColors()

Farben initialisieren

bool
isCliApi()

Prüfen ob CLI

bool
isHttpApi()

Prüfen ob HTTP

bool|null
getReturnCode()

Return-wert

setReturnCode(bool $code)

No description

string
getID()

Eindeutige ID

int|null
getExitCode()

Exit-Code

setExitCode(int $code)

Exit-Code setzen

static Ignition
getInstance(string $name = null)

Instanz holen oder erstellen

string
getEnvironment(string $key, mixed $default = null)

Environment auslesen und zurückgegen. Es wird in ENV und SERVER gesucht. Wird keine Variable gefunden, wird default zurückgegeben.

array
loadIniFile(string $path)

Ini auslesen

string
getSystemPath(string $name)

Systempfad auslesen

bool
getBooleanFromSystemIni(string $key, string $section, bool $default)

Prüft die Verfügbarkeit des Wertes und gibt ein boolean zurück.

static string
sanitizePath(string $path, string|null $basepath = null)

No description

array|null
getSystemIni()

SystemInit

array|null
getAssemblyIni()

Platform

string
getSystemIniPath()

No description

string
getEnvironmentConfigVariable()

Neme der Environmentvariable

string
getAssemblyIniPath()

Assembly-Path

initIniFiles(string $environmentKey)

No description

runUnits()

Ausführen der Units

string
initUnitClassAndGetName(string $unit)

Unit-Klasse einbinden

static string
mask(string $value, string $key = null)

No description

static type
getVariableForJson(type $variable)

No description

static type
getVariableForTextDump(type $label, type $variable)

No description

string
getExceptionLogDirectory()

Logverzeichnis

writeExceptionLog(Exception $exception)

Startup-Log im Fehlerfall schreiben

type
handleExit()

No description

$this
handleException(Exception $exception)

No description

writeToCli(string $text, string|null $modifier = null)

Ausgabe eines Textes

writeLineToCli(string $text, string|null $modifier = null)

Ausgabe einer Zeile

$this
handleCliException(Exception $exception)

No description

$this
handleHttpException(Exception $exception)

No description

string|null
getSupportedMimeType(array $supportedTypes)

No description

sendHeaders()

Headers senden

setHttpStatus(string $status)

HTTP-Status setzen

setHeader(string $key, string $value)

Headers setzen

boolean
shouldExecuteForThisClient(string $pattern)

Prüfen, ob die Anweisung auf dem Client ausgeführt werden soll

Details

at line 390
protected Ignition initColors()

Farben initialisieren

Return Value

Ignition

at line 426
bool isCliApi()

Prüfen ob CLI

Return Value

bool

at line 435
bool isHttpApi()

Prüfen ob HTTP

Return Value

bool

at line 444
bool|null getReturnCode()

Return-wert

Return Value

bool|null

at line 454
Ignition setReturnCode(bool $code)

Parameters

bool $code

Return Value

Ignition

at line 464
string getID()

Eindeutige ID

Return Value

string

at line 473
int|null getExitCode()

Exit-Code

Return Value

int|null

at line 484
Ignition setExitCode(int $code)

Exit-Code setzen

Parameters

int $code

Return Value

Ignition

at line 500
static Ignition getInstance(string $name = null)

Instanz holen oder erstellen

Ignition-Instanz holen, oder falls noch nicht initialisert, neue Instanz erstellen. Der Parameter ´$name´ wird nur beim ersten Aufruf beachtet.

Parameters

string $name Initialisierung mit Anwendungsnamen (nur für den ersten Aufruf wichtig.

Return Value

Ignition

at line 518
string getEnvironment(string $key, mixed $default = null)

Environment auslesen und zurückgegen. Es wird in ENV und SERVER gesucht. Wird keine Variable gefunden, wird default zurückgegeben.

Parameters

string $key
mixed $default

Return Value

string

at line 547
protected array loadIniFile(string $path)

Ini auslesen

Parameters

string $path

Return Value

array

Exceptions

Exception

at line 571
string getSystemPath(string $name)

Systempfad auslesen

Parameters

string $name

Return Value

string

Exceptions

Exception

at line 606
bool getBooleanFromSystemIni(string $key, string $section, bool $default)

Prüft die Verfügbarkeit des Wertes und gibt ein boolean zurück.

"true", "1" und "on" werden als true, alle anderen Werte als false zurückgegeben.

Parameters

string $key
string $section
bool $default

Return Value

bool

Exceptions

Exception

at line 642
static string sanitizePath(string $path, string|null $basepath = null)

Parameters

string $path
string|null $basepath Basispfad bei relativen Pfaden

Return Value

string

Exceptions

Exception

at line 682
array|null getSystemIni()

SystemInit

Return Value

array|null

at line 691
array|null getAssemblyIni()

Platform

Return Value

array|null

at line 699
protected string getSystemIniPath()

Return Value

string

at line 721
protected string getEnvironmentConfigVariable()

Neme der Environmentvariable

Return Value

string

at line 730
protected string getAssemblyIniPath()

Assembly-Path

Return Value

string

at line 741
Ignition initIniFiles(string $environmentKey)

Parameters

string $environmentKey

Return Value

Ignition

at line 755
Ignition runUnits()

Ausführen der Units

Return Value

Ignition

Exceptions

Exception

at line 794
protected string initUnitClassAndGetName(string $unit)

Unit-Klasse einbinden

Parameters

string $unit

Return Value

string

Exceptions

Exception

at line 824
static protected string mask(string $value, string $key = null)

Parameters

string $value
string $key

Return Value

string

at line 846
static protected type getVariableForJson(type $variable)

Parameters

type $variable

Return Value

type

at line 879
static protected type getVariableForTextDump(type $label, type $variable)

Parameters

type $label
type $variable

Return Value

type

at line 915
protected string getExceptionLogDirectory()

Logverzeichnis

Return Value

string

at line 940
Ignition writeExceptionLog(Exception $exception)

Startup-Log im Fehlerfall schreiben

Parameters

Exception $exception

Return Value

Ignition

at line 1000
type handleExit()

Return Value

type

at line 1025
$this handleException(Exception $exception)

Parameters

Exception $exception

Return Value

$this

at line 1041
Ignition writeToCli(string $text, string|null $modifier = null)

Ausgabe eines Textes

Parameters

string $text
string|null $modifier

Return Value

Ignition

at line 1056
Ignition writeLineToCli(string $text, string|null $modifier = null)

Ausgabe einer Zeile

Parameters

string $text
string|null $modifier

Return Value

Ignition

at line 1079
protected $this handleCliException(Exception $exception)

Parameters

Exception $exception

Return Value

$this

at line 1094
protected $this handleHttpException(Exception $exception)

Parameters

Exception $exception

Return Value

$this

at line 1186
protected string|null getSupportedMimeType(array $supportedTypes)

Parameters

array $supportedTypes

Return Value

string|null

at line 1215
protected Ignition sendHeaders()

Headers senden

Return Value

Ignition

Exceptions

Exception

at line 1247
Ignition setHttpStatus(string $status)

HTTP-Status setzen

Parameters

string $status

Return Value

Ignition

Exceptions

Exception

at line 1267
Ignition setHeader(string $key, string $value)

Headers setzen

Parameters

string $key
string $value

Return Value

Ignition

Exceptions

Exception

at line 1284
protected boolean shouldExecuteForThisClient(string $pattern)

Prüfen, ob die Anweisung auf dem Client ausgeführt werden soll

Parameters

string $pattern

Return Value

boolean