app
in package
Class app
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- __destruct() : mixed
- checkifarraynull() : bool
- Checks if any value in the given array is null recursively.
- convertdt() : string
- Konvertiert einen DateTime-Wert in Linux-Timestamp
- debug() : string
- Debug einer Variable
- decrypt() : string|bool
- Entschlüsselt einen String
- encrypt() : string|bool
- Verschlüsselt einen String
- getcfg() : string|false
- Liest Werte aus der Config-Datei
- in_array_r() : bool
- Checks if a value exists in a multidimensional array recursively.
- redirect() : void
- Redirects the user to a specified path.
- setnotification() : void
- Sets a notification by setting cookies with the given title, message, and optional icon.
- since() : string
- Returns the time duration since a given timestamp
- utf8encode() : string|bool
- Encodes a given string to UTF-8.
Properties
$url
public
string
$url
$cfg
private
object
$cfg
Methods
__construct()
public
__construct() : mixed
__destruct()
public
__destruct() : mixed
checkifarraynull()
Checks if any value in the given array is null recursively.
public
checkifarraynull(array<string|int, mixed> $arr) : bool
Parameters
- $arr : array<string|int, mixed>
-
The array to be checked.
Return values
bool —Returns true if any value in the array is null, false otherwise.
convertdt()
Konvertiert einen DateTime-Wert in Linux-Timestamp
public
convertdt(string $datetime) : string
Parameters
- $datetime : string
-
DateTime
Return values
string —Timestamp
debug()
Debug einer Variable
public
debug(mixed $var) : string
Parameters
- $var : mixed
-
Variable
Return values
string —Debug-Ausgabe (echo)
decrypt()
Entschlüsselt einen String
public
decrypt(string $esh) : string|bool
Parameters
- $esh : string
-
verschlüsselter String
Return values
string|bool —entschlüsselter String
encrypt()
Verschlüsselt einen String
public
encrypt(string $var) : string|bool
Parameters
- $var : string
-
String
Return values
string|bool —verschlüsselter String
getcfg()
Liest Werte aus der Config-Datei
public
getcfg(string $sec, string $key) : string|false
Parameters
- $sec : string
-
Sektion
- $key : string
-
Key
Return values
string|false —Wenn die Sektion und Key existiert, den Wert. Sonst false
in_array_r()
Checks if a value exists in a multidimensional array recursively.
public
in_array_r(string $needle, array<string|int, mixed> $haystack[, bool $strict = false ]) : bool
Parameters
- $needle : string
-
The value to search for.
- $haystack : array<string|int, mixed>
-
The array to search in.
- $strict : bool = false
-
Whether to perform strict comparison.
Return values
bool —True if the value is found, false otherwise.
redirect()
Redirects the user to a specified path.
public
redirect([string $path = '/' ]) : void
Parameters
- $path : string = '/'
-
The path to redirect the user to. Default is '/'.
setnotification()
Sets a notification by setting cookies with the given title, message, and optional icon.
public
setnotification(string $title, string $message[, string $icon = 'main' ]) : void
Parameters
- $title : string
-
The title of the notification.
- $message : string
-
The message of the notification.
- $icon : string = 'main'
-
(Optional) The icon of the notification. Defaults to 'main'.
since()
Returns the time duration since a given timestamp
public
since(int $timestamp[, int $level = 2 ]) : string
Parameters
- $timestamp : int
-
The timestamp to compare with the current time
- $level : int = 2
-
The number of time units to include in the output (default: 2)
Return values
string —The formatted time duration string
utf8encode()
Encodes a given string to UTF-8.
public
utf8encode(string $val) : string|bool
Parameters
- $val : string
-
The string to be encoded.
Return values
string|bool —The UTF-8 encoded string if successful, otherwise false.