Add note that on change in lib/ folder (add/name/delete) 'composer dump-autoload' must be run to update the composer auto loader as this is currently on testing to not use internal autoloader update all composer/vender autoload configs Check\Basic: just apply updates in deprecated method calls Check\Jason: has been deprecaged and moved to Convert\Json. Primary issue was wrong name "Jason" instead of "Json" Check\Password: only Check\PhpVersion: fix version check for >9 numbers Combined\Array: variable name change to be more clear, all searches are strict for recoursive search, new option for recoursive search many to return only found array data and no control array info. for backwards compatible this is default set to ($old = true) and needs to be set to false to get the new format, array search normal has a new strict flag for forcing strict compare on search. remove some unneeded is_array checks, fixed the flatten array to key to not only use leave elements, but all array keys, if only leaves are wanted the new method flattenArrayKeyLeavesOnly only returns key from leaves Combined\DateTime: checkDateTime got more correct error checks on invalid data compareDate uses strtotimestamp for more easier compare like compareDateTime does, both to a check on inalid timestamp now calcDaysInterval also aborts on invalid data now Convert\Byte: str to bytes does not drop the minus sign anymore Convert\Colors: any error will now return false and not set to some neutral gray. also fix missing round on hsb/hsl special return groups Convert\Html: add constants for CHECKED/SELECTED options, fix remove linebreak to not add two spaces if \r\n was found Convert\Json: moved from Check\Jason and add two new error types Convert\MimeAppName: do not set if mime type or app name is empty Create\Hash: add crc32b to hash allows types so we can create a normal not reversed crc32b Create\Uids: move default hash type to var in class, fix defined constant check Debug\FileWriter: add log folder setting to override config constant settings and also check if we can actually write to the folder and if BASE and LOG constants are not empty Get\System: add constant for getPageName and fix getHostName to be more shorter and faster Language\L10n: remove \Basic class extends because we don't need it there at all Template\SmartyExtend: fix constant check
55 lines
1.5 KiB
PHP
55 lines
1.5 KiB
PHP
<?php // phpcs:ignore warning
|
|
|
|
/**
|
|
* @phan-file-suppress PhanTypeSuspiciousStringExpression
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
$DEBUG_ALL_OVERRIDE = 0; // set to 1 to debug on live/remote server locations
|
|
$DEBUG_ALL = 1;
|
|
$PRINT_ALL = 1;
|
|
$DB_DEBUG = 1;
|
|
|
|
if ($DEBUG_ALL) {
|
|
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
|
|
}
|
|
|
|
ob_start();
|
|
|
|
// basic class test file
|
|
define('USE_DATABASE', false);
|
|
// sample config
|
|
require 'config.php';
|
|
// set session name
|
|
if (!defined('SET_SESSION_NAME')) {
|
|
define('SET_SESSION_NAME', EDIT_SESSION_NAME);
|
|
}
|
|
// define log file id
|
|
$LOG_FILE_ID = 'classTest-system';
|
|
ob_end_flush();
|
|
|
|
use CoreLibs\Get\System;
|
|
use CoreLibs\Debug\Support as DgS;
|
|
|
|
$basic = new CoreLibs\Basic();
|
|
|
|
print "<html><head><title>TEST CLASS: SYSTEM</title><head>";
|
|
print "<body>";
|
|
print '<div><a href="class_test.php">Class Test Master</a></div>';
|
|
|
|
print "GETHOSTNAME: " . DgS::printAr(System::getHostName()) . "<br>";
|
|
print "GETPAGENAME(0): " . System::getPageName() . "<br>";
|
|
print "GETPAGENAME(1): " . System::getPageName(System::NO_EXTENSION) . "<br>";
|
|
print "GETPAGENAME(2): " . System::getPageName(System::FULL_PATH) . "<br>";
|
|
print "GETPAGENAMEARRAY: " . \CoreLibs\Debug\Support::printAr(System::getPageNameArray()) . "<br>";
|
|
// seting errro codes file upload
|
|
print "FILEUPLOADERRORMESSAGE(): " . System::fileUploadErrorMessage(-1) . "<br>";
|
|
print "FILEUPLOADERRORMESSAGE(UPLOAD_ERR_CANT_WRITE): "
|
|
. System::fileUploadErrorMessage(UPLOAD_ERR_CANT_WRITE) . "<br>";
|
|
|
|
// error message
|
|
print $basic->log->printErrorMsg();
|
|
|
|
print "</body></html>";
|