YaWK
24.1
Yet another WebKit
|
The sys class - handles yawk's system core functions. More...
Public Member Functions | |
logMessage ($message) | |
log message to debug_log.txt More... | |
Static Public Member Functions | |
static | addPreTags ($customCSS) |
THIS SEEMS OUTDATED - obviously not needed anymore.... More... | |
static | addTrailingSlash ($url) |
sometimes it is necessary to add a slash to a url. More... | |
static | array2lines ($array, $property) |
Display a multidimensional array line per line. Expects an array and property. More... | |
static | checkIfAssetsAreLoaded ($db, $assets, $switch) |
Check if assets are loaded, load if switch is true. More... | |
static | checkZlib () |
Check if zlib is available. More... | |
static | countCodeLines ($path, $fileType) |
Count code lines and output a small overview. More... | |
static | drawPhpInfo ($lang) |
Display a complete PHPinfo() More... | |
static | encodeChars ($string) |
convert german special chars and vowels into legal html More... | |
static | full_copy ($source, $target) |
copy an entire folder including subdirectories More... | |
static | generateRandomPassword ($length) |
Generate a random password with given length. More... | |
static | getBaseDir () |
Return current base directory. More... | |
static | getBrowser ($useragent) |
extract browser from useragent More... | |
static | getCurrentUserName () |
returns the current user name, if set More... | |
static | getDirPrefix ($db) |
if yawk is installed into a subdirectory, use this to get this prefix directory More... | |
static | getGroupFromId ($db, $id, $table) |
get requested group ID for given page ID More... | |
static | getGroupId ($db, $id, $table) |
get requested group ID for given page ID (used in page-edit) More... | |
static | getGroups ($db, $table) |
get all user groups from database More... | |
static | getHost ($db) |
get hostname (url where yawk is installed) from database More... | |
static | getLoadingTime ($debugTime) |
measure script loading time More... | |
static | getMenuItem ($db, $id) |
get menu item for given page ID More... | |
static | getMenuLanguage ($db, $id) |
returns menu language for given menu ID More... | |
static | getMenuName ($db, $id) |
returns menu name for given menu ID More... | |
static | getOS ($useragent) |
get operating system from useragent string More... | |
static | getProperty ($db, $property, $table, $id) |
get any property from any table where id is given ID More... | |
static | getRobotsText ($db, $path) |
Return the content of /robots.txt. More... | |
static | getSubMenu ($db, $id) |
get submenu ID for given page ID More... | |
static | getWeekday ($date, $lang) |
return weekday from given date More... | |
static | isBrowscapSet ($useragent) |
check if browscap file is set More... | |
static | iStatusToString ($i, $on, $off) |
convert a integer status to string variable (0|1) to online / offline More... | |
static | minify ($content) |
Minify any string: removes spaces, tabs and linebreaks. More... | |
static | minifyCSS ($input) |
Minify any string: removes spaces, tabs and linebreaks. More... | |
static | minifyHTML ($input) |
HTML Minifier - minify any string: removes spaces, tabstops and linebreaks. More... | |
static | minifyJs ($input) |
Minify any string: removes spaces, tabs and linebreaks. More... | |
static | multiarray2lines ($array, $property) |
Display a multidimensional array line per line. Expects an array and property. More... | |
static | now () |
returns the current datetime More... | |
static | outputObjects ($template, $lang, $controller, $page, $user, $stats) |
check if objects exists and display their data More... | |
static | parse_phpinfo () |
Read phpinfo() into multidimensional array and return it. More... | |
static | read_recursive ($path) |
Read a directory recursively. More... | |
static | recurseRmdir ($dir) |
remove a directory recurse More... | |
static | replaceCarriageReturns ($replace, $string) |
replace all carriage returns with linebreaks More... | |
static | replacePreTags ($replace, $customCSS) |
removes all unnecessary HTML tags from custom.css More... | |
static | safeFileReWrite ($fileName, $dataToSave) |
Safe way to open a file and update data. More... | |
static | setRobotsText ($path, $content) |
Set the content of /robots.txt (overwrite) More... | |
static | setTimeout ($location, $wait) |
set a timeout and force page reload via JS More... | |
static | splitDate ($date) |
split a date to month, day, year and time More... | |
static | splitDateShort ($date) |
split a date to month, day, year and time this is the same as splitDate() but keep the months short More... | |
static | time_ago ($userdate, $lang) |
how many time is been gone since given date More... | |
static | writeIniFile ($array, $file) |
write ini file More... | |
static | xcopy ($source, $dest, $permissions=0755) |
Copy a file, or recursively copy a folder and its contents. More... | |
The sys class - handles yawk's system core functions.
handles many of yawk's system core functions.
Most of them are static functions, like get and set paths, get ids, roles and so on.
Class covers both, backend & frontend functionality. See Methods Summary for Details!
|
static |
THIS SEEMS OUTDATED - obviously not needed anymore....
string | $customCSS |
Definition at line 780 of file sys.php.
References $customCSS.
|
static |
sometimes it is necessary to add a slash to a url.
string | $url | the url were the slash needs to be added |
Definition at line 1147 of file sys.php.
References $url.
Referenced by YAWK\sys\getHost().
|
static |
Display a multidimensional array line per line. Expects an array and property.
Definition at line 135 of file sys.php.
References $item.
Referenced by YAWK\sys\drawPhpInfo().
|
static |
Check if assets are loaded, load if switch is true.
$db | object Database object |
$assets | array Required assets as array |
$switch | bool true|false If true, required assset gets loaded if not |
This methods checks if given assets are loaded and load them on demand
Definition at line 26 of file sys.php.
References $db, $res, $templateID, $type, and YAWK\template\getCurrentTemplateId().
|
static |
|
static |
Count code lines and output a small overview.
object | $db | database object |
string | $path | the full path (including base path) |
string | $fileType | file type with leading dot, for example: '.php' |
Definition at line 425 of file sys.php.
References $data, $value, and YAWK\sys\read_recursive().
|
static |
Display a complete PHPinfo()
$lang |
Definition at line 164 of file sys.php.
References $data, YAWK\sys\array2lines(), and YAWK\sys\parse_phpinfo().
|
static |
convert german special chars and vowels into legal html
string | $string | to encode |
Definition at line 1089 of file sys.php.
Referenced by YAWK\page\create(), and YAWK\menu\createMenu().
|
static |
copy an entire folder including subdirectories
string | $source | source directory |
string | $target | target directory |
copy an entire folder into another location
Definition at line 694 of file sys.php.
|
static |
|
static |
Return current base directory.
Definition at line 304 of file sys.php.
Referenced by YAWK\installer\step3(), and YAWK\installer\step4().
|
static |
extract browser from useragent
string | $useragent | the full useragent |
Definition at line 911 of file sys.php.
References $i, and $useragent.
Referenced by YAWK\stats\prepareData().
|
static |
returns the current user name, if set
Definition at line 1284 of file sys.php.
Referenced by YAWK\menu\drawLogoutMenu().
|
static |
if yawk is installed into a subdirectory, use this to get this prefix directory
object | $db | database |
Definition at line 1104 of file sys.php.
References $db, $dirprefix, and YAWK\settings\getSetting().
Referenced by YAWK\widget\getCurrentWidgetPath().
|
static |
get requested group ID for given page ID
object | $db | database |
string | $id | page ID |
string | $table | the table to select from |
$db | \YAWK\db $res |
Definition at line 1217 of file sys.php.
References $db, $res, and YAWK\alert\draw().
|
static |
get requested group ID for given page ID (used in page-edit)
object | $db | database |
string | $id | page ID |
string | $table | the table to select from |
$db | \YAWK\db $res |
Definition at line 1192 of file sys.php.
References $db, $res, and YAWK\alert\draw().
|
static |
|
static |
get hostname (url where yawk is installed) from database
object | $db | database |
Definition at line 1115 of file sys.php.
References $db, YAWK\sys\addTrailingSlash(), and YAWK\settings\getSetting().
Referenced by YAWK\PLUGINS\MESSAGES\messages\__construct(), and YAWK\user\sendResetEmail().
|
static |
measure script loading time
string | $debugTime | starting time |
|
static |
|
static |
|
static |
|
static |
get operating system from useragent string
string | $useragent | full useragent string |
Definition at line 1027 of file sys.php.
References $useragent, and $value.
Referenced by YAWK\stats\prepareData().
|
static |
|
static |
Return the content of /robots.txt.
string | $path | absolute path to the robots.txt file |
Definition at line 334 of file sys.php.
References $db, and YAWK\settings\getLongSetting().
|
static |
|
static |
|
static |
check if browscap file is set
string | $useragent | full useragent |
Definition at line 880 of file sys.php.
References $useragent, and YAWK\alert\draw().
|
static |
convert a integer status to string variable (0|1) to online / offline
int | $i | the status var |
string | $on | string for status 1 (online, published...) |
string | $off | string for status 0 (offline, not published...) |
Definition at line 729 of file sys.php.
References $i.
Referenced by YAWK\menu\toggleItemOffline(), YAWK\menu\toggleOffline(), and YAWK\page\toggleOffline().
YAWK\sys::logMessage | ( | $message | ) |
|
static |
|
static |
Minify any string: removes spaces, tabs and linebreaks.
Definition at line 614 of file sys.php.
Referenced by YAWK\sys\minifyHTML().
|
static |
HTML Minifier - minify any string: removes spaces, tabstops and linebreaks.
https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php
Definition at line 548 of file sys.php.
References YAWK\sys\minifyCSS(), and YAWK\sys\minifyJs().
|
static |
Minify any string: removes spaces, tabs and linebreaks.
Definition at line 664 of file sys.php.
Referenced by YAWK\sys\minifyHTML().
|
static |
|
static |
returns the current datetime
Definition at line 1492 of file sys.php.
References date.
Referenced by YAWK\template\downloadTemplate(), YAWK\stats\prepareData(), YAWK\template\saveAs(), and YAWK\BACKUP\FILES\fileBackup\setBackupSettings().
|
static |
|
static |
Read phpinfo() into multidimensional array and return it.
Definition at line 274 of file sys.php.
Referenced by YAWK\sys\drawPhpInfo().
|
static |
|
static |
remove a directory recurse
string | $dir | the directory to delete |
Definition at line 1127 of file sys.php.
Referenced by YAWK\BACKUP\FILES\fileBackup\doFolderBackup(), and YAWK\BACKUP\backup\doRestore().
|
static |
|
static |
removes all unnecessary HTML tags from custom.css
string | $replace | |
string | $customCSS |
Definition at line 799 of file sys.php.
References $customCSS.
|
static |
|
static |
|
static |
set a timeout and force page reload via JS
string | $location | the url to redirect |
int | $wait | the time in ms to wait before redirect |
Definition at line 864 of file sys.php.
Referenced by YAWK\installer\step5().
|
static |
split a date to month, day, year and time
string | $date | the date to split |
Definition at line 1502 of file sys.php.
References $date.
Referenced by YAWK\BACKEND\AdminLTE\drawHtmlNavbarUserAccountMenu().
|
static |
split a date to month, day, year and time this is the same as splitDate() but keep the months short
string | $date | the date to split |
Definition at line 1572 of file sys.php.
References $date.
Referenced by YAWK\PLUGINS\MESSAGES\messages\MessageView().
|
static |
how many time is been gone since given date
string | $userdate | date to calculate |
array | $lang | language array |
Definition at line 1630 of file sys.php.
References $date, $lang, and YAWK\language\getCurrentLanguageStatic().
Referenced by YAWK\BACKEND\AdminLTE\drawHtmlNavbarMessagesMenu(), YAWK\BACKEND\AdminLTE\drawHtmlNavbarNotificationsMenu(), YAWK\BACKEND\AdminLTE\drawHtmlNavbarWebmailMenu(), YAWK\BACKEND\dashboard\drawLatestPagesBox(), YAWK\BACKEND\dashboard\drawLatestUsers(), and YAWK\PLUGINS\MESSAGES\messages\MessageView().
|
static |
write ini file
$array | |
$file |
Definition at line 2085 of file sys.php.
References $res.
Referenced by YAWK\BACKUP\FILES\fileBackup\doFolderBackup(), YAWK\template\downloadTemplate(), and YAWK\BACKUP\backup\setIniFile().
|
static |
Copy a file, or recursively copy a folder and its contents.
Definition at line 473 of file sys.php.
Referenced by YAWK\BACKUP\FILES\fileBackup\copyFolder(), YAWK\BACKUP\backup\doRestore(), YAWK\template\downloadTemplate(), YAWK\template\saveAs(), and YAWK\template\uploadTemplate().