Code Clean up, more testing
Remove unused code and classes. Clean up code to remove all named constant from them and throw deprecation alerts if used. Add basic psalm setup in root folder and remove from www folder
This commit is contained in:
@@ -11,10 +11,6 @@ $DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
if ($DEBUG_ALL) {
|
||||
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
||||
// basic class test file
|
||||
@@ -35,9 +31,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
// db config with logger
|
||||
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
|
||||
@@ -47,7 +43,15 @@ $l10n = new \CoreLibs\Language\L10n(
|
||||
$locale['domain'],
|
||||
$locale['path'],
|
||||
);
|
||||
$backend = new CoreLibs\Admin\Backend($db, $log, $session, $l10n, $locale);
|
||||
$backend = new CoreLibs\Admin\Backend(
|
||||
$db,
|
||||
$log,
|
||||
$session,
|
||||
$l10n,
|
||||
$locale,
|
||||
DEFAULT_ACL_LEVEL
|
||||
);
|
||||
use CoreLibs\Debug\Support;
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: ADMIN BACKEND';
|
||||
print "<!DOCTYPE html>";
|
||||
@@ -57,11 +61,14 @@ print '<div><a href="class_test.php">Class Test Master</a></div>';
|
||||
print '<div><h1>' . $PAGE_NAME . '</h1></div>';
|
||||
|
||||
// set acl, from eg login acl
|
||||
print "SETACL[]: " . $backend->setACL(['EMPTY' => 'EMPTY']) . "<br>";
|
||||
print "ADBEDITLOG: " . $backend->adbEditLog('CLASSTEST-ADMIN', 'Some info stirng') . "<br>";
|
||||
print "ADBTOPMENU(0): " . \CoreLibs\Debug\Support::printAr($backend->adbTopMenu()) . "<br>";
|
||||
print "ADBMSG: " . $backend->adbMsg('info', 'Message: %1$d', [1]) . "<br>";
|
||||
print "Messaes: " . \CoreLibs\Debug\Support::printAr($backend->messages) . "<br>";
|
||||
print "SETACL[]: <br>";
|
||||
$backend->setACL(['EMPTY' => 'EMPTY']);
|
||||
print "ADBEDITLOG: <br>";
|
||||
$backend->adbEditLog('CLASSTEST-ADMIN', 'Some info string');
|
||||
print "ADBTOPMENU(0): " . Support::printAr($backend->adbTopMenu(CONTENT_PATH)) . "<br>";
|
||||
print "ADBMSG: <br>";
|
||||
$backend->adbMsg('info', 'Message: %1$d', [1]);
|
||||
print "Messaes: " . Support::printAr($backend->messages) . "<br>";
|
||||
print "ADBPRINTDATETIME:<br>" . $backend->adbPrintDateTime(2021, 6, 21, 6, 38, '_test') . "<br>";
|
||||
|
||||
// error message
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -27,6 +23,7 @@ ob_end_flush();
|
||||
|
||||
use CoreLibs\Combined\ArrayHandler;
|
||||
use CoreLibs\Debug\Support as DgS;
|
||||
use CoreLibs\Convert\SetVarType;
|
||||
|
||||
$log = new CoreLibs\Debug\Logging([
|
||||
'log_folder' => BASE . LOG,
|
||||
@@ -34,9 +31,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
// $_array = new CoreLibs\Combined\ArrayHandler();
|
||||
// $array_class = 'CoreLibs\Combination\ArrayHandler';
|
||||
@@ -92,7 +89,9 @@ $array_3 = [
|
||||
]
|
||||
];
|
||||
// recusrice merge
|
||||
print "ARRAYMERGERECURSIVE: " . DgS::printAr(ArrayHandler::arrayMergeRecursive($array_1, $array_2, $array_3)) . "<br>";
|
||||
print "ARRAYMERGERECURSIVE: " . DgS::printAr(SetVarType::setArray(
|
||||
ArrayHandler::arrayMergeRecursive($array_1, $array_2, $array_3)
|
||||
)) . "<br>";
|
||||
// array difference
|
||||
$array_left = [
|
||||
'same' => 'data',
|
||||
@@ -104,7 +103,9 @@ $array_right = [
|
||||
];
|
||||
print "ARRAYDIFF: " . DgS::printAr(ArrayHandler::arrayDiff($array_left, $array_right)) . "<br>";
|
||||
// in array check
|
||||
print "INARRAYANY([1,3], [array]): " . DgS::printAr(ArrayHandler::inArrayAny([1, 3], $array_2)) . "<br>";
|
||||
print "INARRAYANY([1,3], [array]): " . DgS::printAr(SetVarType::setArray(
|
||||
ArrayHandler::inArrayAny([1, 3], $array_2)
|
||||
)) . "<br>";
|
||||
// flatten array
|
||||
print "FLATTENARRAY: " . DgS::printAr(ArrayHandler::flattenArray($test_array)) . "<br>";
|
||||
print "FLATTENARRAYKEY: " . DgS::printAr(ArrayHandler::flattenArrayKey($test_array)) . "<br>";
|
||||
@@ -114,10 +115,10 @@ print "ARRAYFLATFORKEY: " . DgS::printAr(ArrayHandler::arrayFlatForKey($test_arr
|
||||
/**
|
||||
* attach key/value to an array so it becomes nested
|
||||
*
|
||||
* @param string $pre Attach to new (empty for new root node)
|
||||
* @param string $cur New node
|
||||
* @param array $node Previous created array
|
||||
* @return array Updated array
|
||||
* @param string $pre Attach to new (empty for new root node)
|
||||
* @param string $cur New node
|
||||
* @param array<mixed> $node Previous created array
|
||||
* @return array<mixed> Updated array
|
||||
*/
|
||||
function rec(string $pre, string $cur, array $node = [])
|
||||
{
|
||||
|
||||
@@ -11,10 +11,6 @@ $DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
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);
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,9 +29,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$byte_class = 'CoreLibs\Convert\Byte';
|
||||
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -34,9 +30,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: CHECK COLORS';
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -31,9 +27,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: CONFIG DIRECT';
|
||||
@@ -47,7 +43,7 @@ print "DIR: " . DIR . "<br>";
|
||||
print "BASE: " . BASE . "<br>";
|
||||
print "ROOT: " . ROOT . "<br>";
|
||||
print "BASE NAME: " . BASE_NAME . "<br>";
|
||||
echo "Config path prefix: " . $CONFIG_PATH_PREFIX . "<br>";
|
||||
echo "Config path prefix: " . ($CONFIG_PATH_PREFIX ?? '') . "<br>";
|
||||
print "DB Name: " . DB_CONFIG_NAME . "<br>";
|
||||
print "DB Config: " . \CoreLibs\Debug\Support::printAr(DB_CONFIG) . "<br>";
|
||||
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -31,9 +27,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: CONFIG LINK';
|
||||
@@ -47,7 +43,7 @@ print "DIR: " . DIR . "<br>";
|
||||
print "BASE: " . BASE . "<br>";
|
||||
print "ROOT: " . ROOT . "<br>";
|
||||
print "BASE NAME: " . BASE_NAME . "<br>";
|
||||
echo "Config path prefix: " . $CONFIG_PATH_PREFIX . "<br>";
|
||||
echo "Config path prefix: " . ($CONFIG_PATH_PREFIX ?? '') . "<br>";
|
||||
print "DB Name: " . DB_CONFIG_NAME . "<br>";
|
||||
print "DB Config: " . \CoreLibs\Debug\Support::printAr(DB_CONFIG) . "<br>";
|
||||
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -27,6 +23,7 @@ ob_end_flush();
|
||||
|
||||
use CoreLibs\Convert\Colors;
|
||||
use CoreLibs\Debug\Support as DgS;
|
||||
use CoreLibs\Convert\SetVarType;
|
||||
|
||||
$log = new CoreLibs\Debug\Logging([
|
||||
'log_folder' => BASE . LOG,
|
||||
@@ -34,9 +31,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$color_class = 'CoreLibs\Convert\Colors';
|
||||
|
||||
@@ -59,24 +56,40 @@ $hsb = [210, 67, 12];
|
||||
$hsb_f = [210.5, 67.5, 12.5];
|
||||
$hsl = [210, 50, 7.8];
|
||||
print "S::COLOR rgb->hex: $rgb[0], $rgb[1], $rgb[2]: " . Colors::rgb2hex($rgb[0], $rgb[1], $rgb[2]) . "<br>";
|
||||
print "S::COLOR hex->rgb: $hex: " . DgS::printAr(Colors::hex2rgb($hex)) . "<br>";
|
||||
print "C::S/COLOR rgb->hext: $hex: " . DgS::printAr(CoreLibs\Convert\Colors::hex2rgb($hex)) . "<br>";
|
||||
print "S::COLOR hex->rgb: $hex: " . DgS::printAr(SetVarType::setArray(
|
||||
Colors::hex2rgb($hex)
|
||||
)) . "<br>";
|
||||
print "C::S/COLOR rgb->hext: $hex: " . DgS::printAr(SetVarType::setArray(
|
||||
CoreLibs\Convert\Colors::hex2rgb($hex)
|
||||
)) . "<br>";
|
||||
// C(to hsb/hsl)
|
||||
print "S::COLOR rgb->hsb: $rgb[0], $rgb[1], $rgb[2]: "
|
||||
. DgS::printAr(Colors::rgb2hsb($rgb[0], $rgb[1], $rgb[2])) . "<br>";
|
||||
. DgS::printAr(SetVarType::setArray(
|
||||
Colors::rgb2hsb($rgb[0], $rgb[1], $rgb[2])
|
||||
)) . "<br>";
|
||||
print "S::COLOR rgb->hsl: $rgb[0], $rgb[1], $rgb[2]: "
|
||||
. DgS::printAr(Colors::rgb2hsl($rgb[0], $rgb[1], $rgb[2])) . "<br>";
|
||||
. DgS::printAr(SetVarType::setArray(
|
||||
Colors::rgb2hsl($rgb[0], $rgb[1], $rgb[2])
|
||||
)) . "<br>";
|
||||
// D(from hsb/hsl) Note that param 2 + 3 is always 0-100 divided
|
||||
print "S::COLOR hsb->rgb: $hsb[0], $hsb[1], $hsb[2]: "
|
||||
. DgS::printAr(Colors::hsb2rgb($hsb[0], $hsb[1], $hsb[2])) . "<br>";
|
||||
print "S::COLOR hsb_f->rgb: $hsb_f[0], $hsb_f[1], $hsb_f[2]: "
|
||||
. DgS::printAr(Colors::hsb2rgb($hsb_f[0], $hsb_f[1], $hsb_f[2])) . "<br>";
|
||||
. DgS::printAr(SetVarType::setArray(
|
||||
Colors::hsb2rgb($hsb[0], $hsb[1], $hsb[2])
|
||||
)) . "<br>";
|
||||
print "S::COLOR hsb_f->rgb: $hsb_f[0], $hsb_f[1], $hsb_f[2]: "
|
||||
. DgS::printAr(SetVarType::setArray(
|
||||
Colors::hsb2rgb($hsb_f[0], $hsb_f[1], $hsb_f[2])
|
||||
)) . "<br>";
|
||||
print "S::COLOR hsl->rgb: $hsl[0], $hsl[1], $hsl[2]: "
|
||||
. DgS::printAr(Colors::hsl2rgb($hsl[0], $hsl[1], $hsl[2])) . "<br>";
|
||||
. DgS::printAr(SetVarType::setArray(
|
||||
Colors::hsl2rgb($hsl[0], $hsl[1], $hsl[2])
|
||||
)) . "<br>";
|
||||
|
||||
$hsb = [0, 0, 5];
|
||||
print "S::COLOR hsb->rgb: $hsb[0], $hsb[1], $hsb[2]: "
|
||||
. DgS::printAr(Colors::hsb2rgb($hsb[0], $hsb[1], $hsb[2])) . "<br>";
|
||||
. DgS::printAr(SetVarType::setArray(
|
||||
Colors::hsb2rgb($hsb[0], $hsb[1], $hsb[2])
|
||||
)) . "<br>";
|
||||
|
||||
// Random text
|
||||
$h = rand(0, 359);
|
||||
@@ -84,8 +97,8 @@ $s = rand(15, 70);
|
||||
$b = 100;
|
||||
$l = 50;
|
||||
print "RANDOM IN: H: " . $h . ", S: " . $s . ", B/L: " . $b . "/" . $l . "<br>";
|
||||
print "RANDOM hsb->rgb: <pre>" . DgS::printAr(Colors::hsb2rgb($h, $s, $b)) . "</pre><br>";
|
||||
print "RANDOM hsl->rgb: <pre>" . DgS::printAr(Colors::hsl2rgb($h, $s, $l)) . "</pre><br>";
|
||||
print "RANDOM hsb->rgb: <pre>" . DgS::printAr(SetVarType::setArray(Colors::hsb2rgb($h, $s, $b))) . "</pre><br>";
|
||||
print "RANDOM hsl->rgb: <pre>" . DgS::printAr(SetVarType::setArray(Colors::hsl2rgb($h, $s, $l))) . "</pre><br>";
|
||||
|
||||
// TODO: run compare check input must match output
|
||||
|
||||
|
||||
@@ -13,10 +13,6 @@ $PRINT_ALL = true;
|
||||
$ECHO_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
if ($DEBUG_ALL) {
|
||||
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
||||
// basic class test file
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -34,9 +30,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$datetime_class = 'CoreLibs\Combined\DateTime';
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL ?? true,
|
||||
'echo_all' => $ECHO_ALL,
|
||||
'print_all' => $PRINT_ALL ?? true,
|
||||
]);
|
||||
// db connection and attach logger
|
||||
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
|
||||
|
||||
@@ -24,6 +24,7 @@ ob_end_flush();
|
||||
use CoreLibs\Debug\Support as DgS;
|
||||
use CoreLibs\DB\IO as DbIo;
|
||||
use CoreLibs\Debug\Support;
|
||||
use CoreLibs\Convert\SetVarType;
|
||||
|
||||
$log = new CoreLibs\Debug\Logging([
|
||||
'log_folder' => BASE . LOG,
|
||||
@@ -31,9 +32,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL ?? true,
|
||||
'echo_all' => $ECHO_ALL,
|
||||
'print_all' => $PRINT_ALL ?? true,
|
||||
]);
|
||||
// db connection and attach logger
|
||||
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
|
||||
@@ -131,7 +132,7 @@ $status = $db->dbExec("INSERT INTO test_foo (test, number_a) VALUES "
|
||||
print "DIRECT INSERT STATUS: " . Support::printToString($status) . " |<br>"
|
||||
. "QUERY: " . $db->dbGetQuery() . " |<br>"
|
||||
. "DB OBJECT: <pre>" . print_r($status, true) . "</pre>| "
|
||||
. "PRIMARY KEY: " . $db->dbGetInsertPK() . " | "
|
||||
. "PRIMARY KEY: " . Support::printToString($db->dbGetInsertPK()) . " | "
|
||||
. "RETURNING EXT: " . print_r($db->dbGetReturningExt(), true) . " | "
|
||||
. "RETURNING EXT[test]: " . print_r($db->dbGetReturningExt('test'), true) . " | "
|
||||
. "RETURNING ARRAY: " . print_r($db->dbGetReturningArray(), true) . "<br>";
|
||||
@@ -152,7 +153,7 @@ $status = $db->dbExec($query);
|
||||
print "EOM STRING DIRECT INSERT STATUS: " . Support::printToString($status) . " |<br>"
|
||||
. "QUERY: " . $db->dbGetQuery() . " |<br>"
|
||||
. "DB OBJECT: <pre>" . print_r($status, true) . "</pre>| "
|
||||
. "PRIMARY KEY: " . $db->dbGetInsertPK() . " | "
|
||||
. "PRIMARY KEY: " . Support::printToString($db->dbGetInsertPK()) . " | "
|
||||
. "RETURNING EXT: " . print_r($db->dbGetReturningExt(), true) . " | "
|
||||
. "RETURNING EXT[test]: " . print_r($db->dbGetReturningExt('test'), true) . " | "
|
||||
. "RETURNING ARRAY: " . print_r($db->dbGetReturningArray(), true) . "<br>";
|
||||
@@ -164,12 +165,13 @@ var_dump($db->dbGetReturningExt());
|
||||
$last_insert_pk = $db->dbGetInsertPK();
|
||||
print "DIRECT INSERT PREVIOUS INSERTED: "
|
||||
. print_r($db->dbReturnRow("SELECT test_foo_id, test FROM test_foo "
|
||||
. "WHERE test_foo_id = " . $last_insert_pk), true) . "<br>";
|
||||
. "WHERE test_foo_id = " . (int)$last_insert_pk), true) . "<br>";
|
||||
$__last_insert_pk = (int)$last_insert_pk;
|
||||
$q = <<<EOM
|
||||
SELECT
|
||||
test_foo_id, test
|
||||
FROM test_foo
|
||||
WHERE test_foo_id = $last_insert_pk;
|
||||
WHERE test_foo_id = $__last_insert_pk;
|
||||
EOM;
|
||||
print "EOM READ OF PREVIOUS INSERTED: " . print_r($db->dbReturnRow($q), true) . "<br>";
|
||||
print "LAST ERROR: " . $db->dbGetLastError() . "<br>";
|
||||
@@ -180,13 +182,13 @@ $db->dbPrepare("ins_test_foo", "INSERT INTO test_foo (test) VALUES ($1) RETURNIN
|
||||
$status = $db->dbExecute("ins_test_foo", ['BAR TEST ' . time()]);
|
||||
print "PREPARE INSERT[ins_test_foo] STATUS: " . Support::printToString($status) . " |<br>"
|
||||
. "QUERY: " . $db->dbGetPrepareCursorValue('ins_test_foo', 'query') . " |<br>"
|
||||
. "PRIMARY KEY: " . $db->dbGetInsertPK() . " | "
|
||||
. "PRIMARY KEY: " . Support::printToString($db->dbGetInsertPK()) . " | "
|
||||
. "RETURNING EXT: " . print_r($db->dbGetReturningExt(), true) . " | "
|
||||
. "RETURNING RETURN: " . print_r($db->dbGetReturningArray(), true) . "<br>";
|
||||
|
||||
print "PREPARE INSERT PREVIOUS INSERTED: "
|
||||
. print_r($db->dbReturnRow("SELECT test_foo_id, test FROM test_foo "
|
||||
. "WHERE test_foo_id = " . $db->dbGetInsertPK()), true) . "<br>";
|
||||
. "WHERE test_foo_id = " . (int)$db->dbGetInsertPK()), true) . "<br>";
|
||||
|
||||
print "PREPARE CURSOR RETURN:<br>";
|
||||
foreach (['pk_name', 'count', 'query', 'returning_id'] as $key) {
|
||||
@@ -205,7 +207,7 @@ $db->dbPrepare("ins_test_foo_eom", $query);
|
||||
$status = $db->dbExecute("ins_test_foo_eom", ['EOM BAR TEST ' . time()]);
|
||||
print "EOM STRING PREPARE INSERT[ins_test_foo_eom] STATUS: " . Support::printToString($status) . " |<br>"
|
||||
. "QUERY: " . $db->dbGetPrepareCursorValue('ins_test_foo_eom', 'query') . " |<br>"
|
||||
. "PRIMARY KEY: " . $db->dbGetInsertPK() . " | "
|
||||
. "PRIMARY KEY: " . Support::printToString($db->dbGetInsertPK()) . " | "
|
||||
. "RETURNING EXT: " . print_r($db->dbGetReturningExt(), true) . " | "
|
||||
. "RETURNING RETURN: " . print_r($db->dbGetReturningArray(), true) . "<br>";
|
||||
|
||||
@@ -255,21 +257,21 @@ print "EOM STRING DIRECT MULTIPLE INSERT WITH RETURN STATUS: " . Support::printT
|
||||
$status = $db->dbExec("INSERT INTO test_foo (test) VALUES ('FOO; TEST " . time() . "')");
|
||||
print "DIRECT INSERT NO RETURN STATUS: " . Support::printToString($status) . " |<br>"
|
||||
. "QUERY: " . $db->dbGetQuery() . " |<br>"
|
||||
. "PRIMARY KEY: " . $db->dbGetInsertPK() . " | "
|
||||
. "PRIMARY KEY: " . Support::printToString($db->dbGetInsertPK()) . " | "
|
||||
. "RETURNING EXT: " . print_r($db->dbGetReturningExt(), true) . " | "
|
||||
. "RETURNING ARRAY: " . print_r($db->dbGetReturningArray(), true) . "<br>";
|
||||
$last_insert_pk = $db->dbGetInsertPK();
|
||||
|
||||
// is_array read test
|
||||
$q = "SELECT test_foo_id, test FROM test_foo WHERE test_foo_id = " . $last_insert_pk;
|
||||
$q = "SELECT test_foo_id, test FROM test_foo WHERE test_foo_id = " . (int)$last_insert_pk;
|
||||
if (is_array($s_res = $db->dbReturnRow($q)) && !empty($s_res['test'])) {
|
||||
print "WE HAVE DATA FOR: " . $last_insert_pk . " WITH: " . $s_res['test'] . "<br>";
|
||||
print "WE HAVE DATA FOR: " . Support::printToString($last_insert_pk) . " WITH: " . $s_res['test'] . "<br>";
|
||||
}
|
||||
|
||||
// UPDATE WITH RETURNING
|
||||
$status = $db->dbExec("UPDATE test_foo SET test = 'SOMETHING DIFFERENT' "
|
||||
. "WHERE test_foo_id = " . $last_insert_pk . " RETURNING test");
|
||||
print "UPDATE WITH PK " . $last_insert_pk
|
||||
. "WHERE test_foo_id = " . (int)$last_insert_pk . " RETURNING test");
|
||||
print "UPDATE WITH PK " . Support::printToString($last_insert_pk)
|
||||
. " RETURN STATUS: " . Support::printToString($status) . " |<br>"
|
||||
. "QUERY: " . $db->dbGetQuery() . " |<br>"
|
||||
. "RETURNING EXT: " . print_r($db->dbGetReturningExt(), true) . " | "
|
||||
@@ -279,14 +281,14 @@ print "UPDATE WITH PK " . $last_insert_pk
|
||||
$status = $db->dbExec("INSERT INTO test_foobar (type, integer) VALUES ('WITHOUT DATA', 456)");
|
||||
print "INSERT WITH NO PRIMARY KEY NO RETURNING STATUS: " . Support::printToString($status) . " |<br>"
|
||||
. "QUERY: " . $db->dbGetQuery() . " |<br>"
|
||||
. "PRIMARY KEY: " . $db->dbGetInsertPK() . " | "
|
||||
. "PRIMARY KEY: " . Support::printToString($db->dbGetInsertPK()) . " | "
|
||||
. "RETURNING EXT: " . print_r($db->dbGetReturningExt(), true) . " | "
|
||||
. "RETURNING ARRAY: " . print_r($db->dbGetReturningArray(), true) . "<br>";
|
||||
|
||||
$status = $db->dbExec("INSERT INTO test_foobar (type, integer) VALUES ('WITH DATA', 123) RETURNING type, integer");
|
||||
print "INSERT WITH NO PRIMARY KEY WITH RETURNING STATUS: " . Support::printToString($status) . " |<br>"
|
||||
. "QUERY: " . $db->dbGetQuery() . " |<br>"
|
||||
. "PRIMARY KEY: " . $db->dbGetInsertPK() . " | "
|
||||
. "PRIMARY KEY: " . Support::printToString($db->dbGetInsertPK()) . " | "
|
||||
. "RETURNING EXT: " . print_r($db->dbGetReturningExt(), true) . " | "
|
||||
. "RETURNING ARRAY: " . print_r($db->dbGetReturningArray(), true) . "<br>";
|
||||
|
||||
@@ -339,7 +341,7 @@ echo "<hr>";
|
||||
|
||||
// NOTE: try to replacate connection still exists if script is run a second time
|
||||
// open pg bouncer connection
|
||||
$db_pgb = new CoreLibs\DB\IO($DB_CONFIG['test_pgbouncer'], $log);
|
||||
$db_pgb = new CoreLibs\DB\IO($DB_CONFIG['test_pgbouncer'] ?? [], $log);
|
||||
print "[PGB] DBINFO: " . $db_pgb->dbInfo() . "<br>";
|
||||
if ($db->dbPrepare('pgb_sel_test_foo', $q_prep) === false) {
|
||||
print "[PGB] [1] Error in pgb_sel_test_foo prepare<br>";
|
||||
@@ -356,7 +358,9 @@ $db_pgb->dbClose();
|
||||
|
||||
# db write class test
|
||||
$table = 'test_foo';
|
||||
print "TABLE META DATA: " . DgS::printAr($db->dbShowTableMetaData($table)) . "<br>";
|
||||
print "TABLE META DATA: " . DgS::printAr(SetVarType::setArray(
|
||||
$db->dbShowTableMetaData($table)
|
||||
)) . "<br>";
|
||||
// insert first, then use primary key to update
|
||||
$primary_key = ''; # unset
|
||||
$db_write_table = ['test', 'string_a', 'number_a', 'some_bool'];
|
||||
@@ -379,7 +383,7 @@ $data = [
|
||||
];
|
||||
$primary_key = $db->dbWriteDataExt(
|
||||
$db_write_table,
|
||||
$primary_key,
|
||||
(int)$primary_key,
|
||||
$table,
|
||||
$object_fields_not_touch,
|
||||
$object_fields_not_update,
|
||||
@@ -391,7 +395,7 @@ $data = [
|
||||
];
|
||||
$primary_key = $db->dbWriteDataExt(
|
||||
$db_write_table,
|
||||
$primary_key,
|
||||
(int)$primary_key,
|
||||
$table,
|
||||
$object_fields_not_touch,
|
||||
$object_fields_not_update,
|
||||
@@ -403,7 +407,7 @@ $data = [
|
||||
];
|
||||
$primary_key = $db->dbWriteDataExt(
|
||||
$db_write_table,
|
||||
$primary_key,
|
||||
(int)$primary_key,
|
||||
$table,
|
||||
$object_fields_not_touch,
|
||||
$object_fields_not_update,
|
||||
@@ -508,24 +512,24 @@ while (($ret = $db->dbCheckAsync()) === true)
|
||||
// search path check
|
||||
$q = "SHOW search_path";
|
||||
$cursor = $db->dbExec($q);
|
||||
$data = $db->dbFetchArray($cursor)['search_path'];
|
||||
$data = $db->dbFetchArray($cursor)['search_path'] ?? '';
|
||||
print "RETURN DATA FOR search_path: " . $data . "<br>";
|
||||
// print "RETURN DATA FOR search_path: " . DgS::printAr($data) . "<br>";
|
||||
// insert something into test.schema_test and see if we get the PK back
|
||||
$status = $db->dbExec(
|
||||
"INSERT INTO test.schema_test (contents, id) VALUES "
|
||||
. "('TIME: " . time() . "', " . rand(1, 10) . ")"
|
||||
. "('TIME: " . (string)time() . "', " . (string)rand(1, 10) . ")"
|
||||
);
|
||||
print "OTHER SCHEMA INSERT STATUS: "
|
||||
. Support::printToString($status)
|
||||
. " | PK NAME: " . $db->dbGetInsertPKName()
|
||||
. ", PRIMARY KEY: " . $db->dbGetInsertPK() . "<br>";
|
||||
. ", PRIMARY KEY: " . Support::printToString($db->dbGetInsertPK()) . "<br>";
|
||||
|
||||
print "<b>NULL TEST DB READ</b><br>";
|
||||
$q = "SELECT uid, null_varchar, null_int FROM test_null_data WHERE uid = 'A'";
|
||||
$res = $db->dbReturnRow($q);
|
||||
var_dump($res);
|
||||
print "RES: " . DgS::printAr($res) . "<br>";
|
||||
print "RES: " . DgS::printAr(SetVarType::setArray($res)) . "<br>";
|
||||
print "ISSET: " . isset($res['null_varchar']) . "<br>";
|
||||
print "EMPTY: " . empty($res['null_varchar']) . "<br>";
|
||||
|
||||
|
||||
@@ -13,10 +13,6 @@ $PRINT_ALL = false;
|
||||
$ECHO_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
if ($DEBUG_ALL) {
|
||||
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
||||
// basic class test file
|
||||
@@ -51,12 +47,22 @@ print "<body>";
|
||||
print '<div><a href="class_test.php">Class Test Master</a></div>';
|
||||
print '<div><h1>' . $PAGE_NAME . '</h1></div>';
|
||||
|
||||
function test()
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
function test(): ?string
|
||||
{
|
||||
return DebugSupport::getCallerMethod(1);
|
||||
}
|
||||
|
||||
function test2()
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @return array<mixed>
|
||||
*/
|
||||
function test2(): array
|
||||
{
|
||||
return DebugSupport::getCallerMethodList(1);
|
||||
}
|
||||
@@ -108,19 +114,28 @@ $new_log = new CoreLibs\Debug\Logging([
|
||||
$new_log->debug('OPTIONS TYPE', 'New Type error');
|
||||
print "OPTIONS LOGGER:<br>" . $new_log->printErrorMsg();
|
||||
$new_log->setLogLevel('debug', 'on', ['A', 'B', 'C' => false]);
|
||||
print "LOG LEVEL: " . DebugSupport::printAr($new_log->getLogLevel('debug', 'on')) . "<br>";
|
||||
print "LOG LEVEL: " . DebugSupport::printAr(\CoreLibs\Convert\SetVarType::setArray(
|
||||
$new_log->getLogLevel('debug', 'on')
|
||||
)) . "<br>";
|
||||
|
||||
echo "<b>CLASS DEBUG CALL</b><br>";
|
||||
|
||||
// @codingStandardsIgnoreLine
|
||||
class TestL
|
||||
{
|
||||
/** @var \CoreLibs\Debug\Logging */
|
||||
public $log;
|
||||
public function __construct()
|
||||
{
|
||||
$this->log = new CoreLibs\Debug\Logging();
|
||||
}
|
||||
public function test(string $ts = null)
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param string|null $ts
|
||||
* @return bool
|
||||
*/
|
||||
public function test(?string $ts = null): bool
|
||||
{
|
||||
print "* GETCALLERCLASS(INSIDE CLASS): " . \CoreLibs\Debug\Support::getCallerClass() . "<br>";
|
||||
$this->log->debug('TESTL', 'Logging in class testL' . ($ts !== null ? ': ' . $ts : ''));
|
||||
@@ -131,12 +146,18 @@ class TestL
|
||||
// @codingStandardsIgnoreLine
|
||||
class TestR extends TestL
|
||||
{
|
||||
/** @var string */
|
||||
public $foo;
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
public function subTest()
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function subTest(): bool
|
||||
{
|
||||
print "** GETCALLERCLASS(INSIDE EXTND CLASS): " . \CoreLibs\Debug\Support::getCallerClass() . "<br>";
|
||||
$this->log->debug('TESTR', 'Logging in class testR (extends testL)');
|
||||
@@ -160,12 +181,18 @@ print "CLASS EXTEND: PRINTERRORMSG: <br>" . $tr->log->printErrorMsg() . "<br>";
|
||||
// @codingStandardsIgnoreLine
|
||||
class AttachOutside
|
||||
{
|
||||
/** @var \CoreLibs\Debug\Logging */
|
||||
public $log;
|
||||
public function __construct(object $logger_class)
|
||||
public function __construct(\CoreLibs\Debug\Logging $logger_class)
|
||||
{
|
||||
$this->log = $logger_class;
|
||||
}
|
||||
public function test()
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function test(): string
|
||||
{
|
||||
$this->log->debug('ATTACHOUTSIDE', 'A test');
|
||||
return get_class($this);
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -34,9 +30,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: HTML/ELEMENTS';
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -35,9 +31,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
// class type
|
||||
$_chk_enc = new CoreLibs\Check\Encoding();
|
||||
@@ -102,7 +98,7 @@ foreach ($enc_strings as $_string) {
|
||||
// static use
|
||||
$_string = $enc_strings[1];
|
||||
$string = $chk_enc::checkConvertEncoding($_string, 'UTF-8', 'ISO-2022-JP-MS');
|
||||
print "S::ENC CHECK: $_string: " . ($string === false ? '-OK-' : $string) . "<br>";
|
||||
print "S::ENC CHECK: $_string: " . ($string === false ? '-OK-' : $log->prAr($string)) . "<br>";
|
||||
|
||||
// error message
|
||||
print $log->printErrorMsg();
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,9 +29,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: FILE';
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,9 +29,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$hash_class = 'CoreLibs\Create\Hash';
|
||||
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -34,9 +30,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$_html = new CoreLibs\Convert\Html();
|
||||
$_elements = new CoreLibs\Output\Form\Elements();
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,9 +29,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$_image = new CoreLibs\Output\Image();
|
||||
$image_class = 'CoreLibs\Output\Image';
|
||||
@@ -54,12 +50,15 @@ $thumb_width = 250;
|
||||
$thumb_height = 300;
|
||||
// class
|
||||
$image = BASE . LAYOUT . CONTENT_PATH . IMAGES . 'no_picture_square.jpg';
|
||||
// folders
|
||||
$cache_folder = BASE . LAYOUT . CONTENT_PATH . CACHE . IMAGES;
|
||||
$web_folder = LAYOUT . CACHE . IMAGES;
|
||||
// rotate image first
|
||||
$_image->correctImageOrientation($image);
|
||||
// thumbnail tests
|
||||
echo "<div>CLASS->CREATETHUMBNAILSIMPLE: "
|
||||
. basename($image) . ": WIDTH: $thumb_width<br><img src="
|
||||
. $_image->createThumbnailSimple($image, $thumb_width) . "></div>";
|
||||
. $_image->createThumbnailSimple($image, $thumb_width, 0, $cache_folder, $web_folder) . "></div>";
|
||||
// static
|
||||
$image = BASE . LAYOUT . CONTENT_PATH . IMAGES . 'no_picture.jpg';
|
||||
// rotate image first
|
||||
@@ -67,7 +66,7 @@ $image_class::correctImageOrientation($image);
|
||||
// thumbnail tests
|
||||
echo "<div>S::CREATETHUMBNAILSIMPLE: "
|
||||
. basename($image) . ": WIDTH: $thumb_width<br><img src="
|
||||
. $image_class::createThumbnailSimple($image, $thumb_width) . "></div>";
|
||||
. $image_class::createThumbnailSimple($image, $thumb_width, 0, $cache_folder, $web_folder) . "></div>";
|
||||
|
||||
echo "U-STATIC VARIOUS:<br>";
|
||||
// image thumbnail
|
||||
@@ -92,21 +91,29 @@ $images = array(
|
||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||
foreach ($images as $image) {
|
||||
$image = BASE . LAYOUT . CONTENT_PATH . IMAGES . $image;
|
||||
list ($height, $width, $img_type) = getimagesize($image);
|
||||
list ($height, $width, $img_type) = \CoreLibs\Convert\SetVarType::setArray(getimagesize($image));
|
||||
echo "<div><b>IMAGE INFO</b>: " . $height . "x" . $width . ", TYPE: "
|
||||
. $img_type . " [" . $finfo->file($image) . "]</div>";
|
||||
. $log->prAr($img_type) . " [" . $finfo->file($image) . "]</div>";
|
||||
// rotate image first
|
||||
Image::correctImageOrientation($image);
|
||||
// thumbnail tests
|
||||
echo "<div>" . basename($image) . ": WIDTH: $thumb_width<br><img src="
|
||||
. Image::createThumbnailSimple($image, $thumb_width) . "></div>";
|
||||
. Image::createThumbnailSimple($image, $thumb_width, 0, $cache_folder, $web_folder) . "></div>";
|
||||
echo "<div>" . basename($image) . ": HEIGHT: $thumb_height<br><img src="
|
||||
. Image::createThumbnailSimple($image, 0, $thumb_height) . "></div>";
|
||||
. Image::createThumbnailSimple($image, 0, $thumb_height, $cache_folder, $web_folder) . "></div>";
|
||||
echo "<div>" . basename($image) . ": WIDTH/HEIGHT: $thumb_width x $thumb_height<br><img src="
|
||||
. Image::createThumbnailSimple($image, $thumb_width, $thumb_height) . "></div>";
|
||||
. Image::createThumbnailSimple($image, $thumb_width, $thumb_height, $cache_folder, $web_folder) . "></div>";
|
||||
// test with dummy
|
||||
echo "<div>" . basename($image) . ": WIDTH/HEIGHT: $thumb_width x $thumb_height (+DUMMY)<br><img src="
|
||||
. Image::createThumbnailSimple($image, $thumb_width, $thumb_height, null, true, false) . "></div>";
|
||||
. Image::createThumbnailSimple(
|
||||
$image,
|
||||
$thumb_width,
|
||||
$thumb_height,
|
||||
$cache_folder,
|
||||
$web_folder,
|
||||
true,
|
||||
false
|
||||
) . "></div>";
|
||||
echo "<hr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -34,9 +30,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$json_class = 'CoreLibs\Convert\Json';
|
||||
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,30 +29,44 @@ print '<div><a href="class_test.php">Class Test Master</a></div>';
|
||||
print '<div><h1>' . $PAGE_NAME . '</h1></div>';
|
||||
|
||||
use CoreLibs\Language\L10n;
|
||||
use CoreLibs\Language;
|
||||
use CoreLibs\Debug\Support;
|
||||
|
||||
echo "<br><b>LIST LOCALES</b><br>";
|
||||
|
||||
$locale = 'en_US.UTF-8';
|
||||
$locales = CoreLibs\Language\L10n::listLocales($locale);
|
||||
$locales = L10n::listLocales($locale);
|
||||
print "[" . $locale . "] LOCALES: " . Support::printAr($locales) . "<br>";
|
||||
$locale = 'en.UTF-8';
|
||||
$locales = CoreLibs\Language\L10n::listLocales($locale);
|
||||
$locales = L10n::listLocales($locale);
|
||||
print "[" . $locale . "] LOCALES: " . Support::printAr($locales) . "<br>";
|
||||
|
||||
echo "<br><b>LOCALE INFO</b><br>";
|
||||
echo "<br><b>PARSE LOCAL</b><br>";
|
||||
$locale = 'en_US.UTF-8';
|
||||
$locale_info = CoreLibs\Language\L10n::parseLocale($locale);
|
||||
$locale_info = L10n::parseLocale($locale);
|
||||
print "[" . $locale . "] INFO: " . Support::printAr($locale_info) . "<br>";
|
||||
$locale = 'en.UTF-8';
|
||||
$locale_info = CoreLibs\Language\L10n::parseLocale($locale);
|
||||
$locale_info = L10n::parseLocale($locale);
|
||||
print "[" . $locale . "] INFO: " . Support::printAr($locale_info) . "<br>";
|
||||
|
||||
echo "<br><b>AUTO DETECT</b><br>";
|
||||
|
||||
$get_locale = \CoreLibs\Language\GetLocale::setLocale();
|
||||
print "[AUTO]: " . Support::printAr($get_locale) . "<br>";
|
||||
$get_locale = \CoreLibs\Language\GetLocale::setLocale('en', 'foo', 'ISO-8895');
|
||||
// DEPRECATED
|
||||
// $get_locale = Language\GetLocale::setLocale();
|
||||
// print "[AUTO, DEPRECATED]: " . Support::printAr($get_locale) . "<br>";
|
||||
$get_locale = Language\GetLocale::setLocale(
|
||||
SITE_LOCALE,
|
||||
str_replace('/', '', CONTENT_PATH),
|
||||
null,
|
||||
BASE . INCLUDES . LOCALE
|
||||
);
|
||||
print "[NAMED CONSTANTS OUTSIDE]: " . Support::printAr($get_locale) . "<br>";
|
||||
$get_locale = Language\GetLocale::setLocale(
|
||||
'en',
|
||||
'foo',
|
||||
'ISO-8895',
|
||||
BASE . INCLUDES . LOCALE
|
||||
);
|
||||
print "[OVERRIDE]: " . Support::printAr($get_locale) . "<br>";
|
||||
|
||||
// try to load non existing
|
||||
@@ -69,7 +79,7 @@ $domain = 'admin';
|
||||
$encoding = 'UTF-8';
|
||||
$path = BASE . INCLUDES . LOCALE;
|
||||
// load direct
|
||||
$l = new CoreLibs\Language\L10n($lang, $domain, $path);
|
||||
$l = new L10n($lang, $domain, $path);
|
||||
echo "*<br>";
|
||||
echo "LANGUAGE WANT/SET: " . $lang . '/' . $l->getLocale() . "<br>";
|
||||
echo "DOMAIN WANT/SET: " . $domain . '/' . $l->getDomain() . "<br>";
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -32,13 +28,26 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
|
||||
$login = new CoreLibs\ACL\Login($db, $log, $session);
|
||||
$login = new CoreLibs\ACL\Login(
|
||||
$db,
|
||||
$log,
|
||||
$session,
|
||||
[
|
||||
'auto_login' => false,
|
||||
'default_acl_level' => DEFAULT_ACL_LEVEL,
|
||||
'logout_target' => LOGOUT_TARGET,
|
||||
'site_locale' => SITE_LOCALE,
|
||||
'site_domain' => SITE_DOMAIN,
|
||||
'locale_path' => BASE . INCLUDES . LOCALE,
|
||||
]
|
||||
);
|
||||
ob_end_flush();
|
||||
$login->loginMainCall();
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: LOGIN';
|
||||
print "<!DOCTYPE html>";
|
||||
@@ -53,7 +62,7 @@ echo "MIN ACCESS BASE: " . ($login->loginCheckAccessBase('admin') ? 'OK' : 'BAD'
|
||||
echo "MIN ACCESS PAGE: " . ($login->loginCheckAccessPage('admin') ? 'OK' : 'BAD') . "<br>";
|
||||
|
||||
echo "ACL: " . \CoreLibs\Debug\Support::printAr($login->loginGetAcl()) . "<br>";
|
||||
echo "ACL (MIN): " . \CoreLibs\Debug\Support::printAr($login->loginGetAcl()['min']) . "<br>";
|
||||
echo "ACL (MIN): " . \CoreLibs\Debug\Support::printAr($login->loginGetAcl()['min'] ?? []) . "<br>";
|
||||
|
||||
// error message
|
||||
print $log->printErrorMsg();
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -31,9 +27,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$_math = new CoreLibs\Convert\Math();
|
||||
$math_class = 'CoreLibs\Convert\Math';
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -34,9 +30,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: MEMORY USAGE';
|
||||
|
||||
@@ -4,16 +4,12 @@
|
||||
* @phan-file-suppress PhanTypeSuspiciousStringExpression
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -31,9 +27,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$_mime = new CoreLibs\Convert\MimeAppName();
|
||||
|
||||
|
||||
@@ -11,10 +11,6 @@ $DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
if ($DEBUG_ALL) {
|
||||
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
||||
// basic class test file
|
||||
@@ -63,11 +59,28 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$form = new CoreLibs\Output\Form\Generate(DB_CONFIG, $log, table_arrays: $table_arrays);
|
||||
$locale = CoreLibs\Language\GetLocale::setLocale(
|
||||
SITE_LOCALE,
|
||||
SITE_DOMAIN,
|
||||
SITE_ENCODING,
|
||||
BASE . INCLUDES . LOCALE
|
||||
);
|
||||
$l10n = new CoreLibs\Language\L10n(
|
||||
SITE_LOCALE,
|
||||
SITE_DOMAIN,
|
||||
BASE . INCLUDES . LOCALE
|
||||
);
|
||||
$form = new CoreLibs\Output\Form\Generate(
|
||||
DB_CONFIG,
|
||||
$log,
|
||||
$l10n,
|
||||
$locale,
|
||||
table_arrays: $table_arrays
|
||||
);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: FORM GENERATE';
|
||||
print "<!DOCTYPE html>";
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,9 +29,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$_password = new CoreLibs\Check\Password();
|
||||
$password_class = 'CoreLibs\Check\Password';
|
||||
|
||||
@@ -11,9 +11,6 @@ $DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
if ($DEBUG_ALL) {
|
||||
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,19 +30,43 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
|
||||
$login = new CoreLibs\ACL\Login($db, $log, $session);
|
||||
$locale = \CoreLibs\Language\GetLocale::setLocale();
|
||||
$locale = \CoreLibs\Language\GetLocale::setLocale(
|
||||
SITE_LOCALE,
|
||||
SITE_DOMAIN,
|
||||
SITE_ENCODING,
|
||||
BASE . INCLUDES . LOCALE
|
||||
);
|
||||
$l10n = new \CoreLibs\Language\L10n(
|
||||
$locale['locale'],
|
||||
$locale['domain'],
|
||||
$locale['path'],
|
||||
);
|
||||
$backend = new CoreLibs\Admin\Backend($db, $log, $session, $l10n, $locale);
|
||||
$login = new CoreLibs\ACL\Login(
|
||||
$db,
|
||||
$log,
|
||||
$session,
|
||||
[
|
||||
'auto_login' => true,
|
||||
'default_acl_level' => DEFAULT_ACL_LEVEL,
|
||||
'logout_target' => LOGOUT_TARGET,
|
||||
'site_locale' => $locale['locale'],
|
||||
'site_domain' => $locale['domain'],
|
||||
'locale_path' => $locale['path'],
|
||||
]
|
||||
);
|
||||
$backend = new CoreLibs\Admin\Backend(
|
||||
$db,
|
||||
$log,
|
||||
$session,
|
||||
$l10n,
|
||||
$locale,
|
||||
DEFAULT_ACL_LEVEL
|
||||
);
|
||||
$backend->db->dbInfo(true);
|
||||
ob_end_flush();
|
||||
|
||||
@@ -126,7 +147,9 @@ foreach (['on', 'off'] as $flag) {
|
||||
foreach (['debug', 'echo', 'print'] as $type) {
|
||||
$prefix = $flag == 'off' ? 'NOT ' : '';
|
||||
print $prefix . strtoupper($type) . ' OUT: '
|
||||
. \CoreLibs\Debug\Support::printAr($backend->log->getLogLevel($type, $flag)) . '<br>';
|
||||
. \CoreLibs\Debug\Support::printAr(\CoreLibs\Convert\SetVarType::setArray(
|
||||
$backend->log->getLogLevel($type, $flag)
|
||||
)) . '<br>';
|
||||
}
|
||||
}
|
||||
foreach (['debug', 'echo', 'print'] as $type) {
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,9 +29,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$_phpv = new CoreLibs\Check\PhpVersion();
|
||||
$phpv_class = 'CoreLibs\Check\PhpVersion';
|
||||
@@ -71,6 +67,8 @@ print "S::MAX $max_version_ss: " . (string)$phpv_class::checkPHPVersion(null, $m
|
||||
// use stats
|
||||
print "U-S::MIN: $min_version: " . (string)PhpVersion::checkPHPVersion($min_version) . "<br>";
|
||||
|
||||
print "PHP_VERSION_ID: " . PHP_VERSION_ID . "<br>";
|
||||
|
||||
// error message
|
||||
print $log->printErrorMsg();
|
||||
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,9 +29,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$array_class = 'CoreLibs\Create\RandomKey';
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL ?? true,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? true,
|
||||
]);
|
||||
$ref_class = 'CoreLibs\Get\ReadEnvFile';
|
||||
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -33,9 +29,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: RUNNING TIME';
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
@@ -53,9 +49,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
use CoreLibs\Create\Session;
|
||||
$session = new Session();
|
||||
@@ -128,11 +124,11 @@ $session->unsetS('setwrap');
|
||||
print "[READ WRAP] unset setwrap: " . $session->getS('setwrap') . "<br>";
|
||||
print "[READ WRAP] unset Isset: " . ($session->issetS('setwrap') ? 'Yes' : 'No') . "<br>";
|
||||
// test __get/__set
|
||||
$session->setwrap = 'YES, magic set _SESSION var';
|
||||
print "[READ MAGIC] A setwrap: " . $session->setwrap . "<br>";
|
||||
$session->setwrap = 'YES, magic set _SESSION var'; /** @phpstan-ignore-line GET/SETTER */
|
||||
print "[READ MAGIC] A setwrap: " . ($session->setwrap ?? '') . "<br>";
|
||||
print "[READ MAGIC] Isset: " . (isset($session->setwrap) ? 'Yes' : 'No') . "<br>";
|
||||
unset($session->setwrap);
|
||||
print "[READ MAGIC] unset setwrap: " . $session->setwrap . "<br>";
|
||||
print "[READ MAGIC] unset setwrap: " . ($session->setwrap ?? '') . "<br>";
|
||||
print "[READ MAGIC] unset Isset: " . (isset($session->setwrap) ? 'Yes' : 'No') . "<br>";
|
||||
|
||||
// differnt session name
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
@@ -53,9 +49,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
use CoreLibs\Create\Session;
|
||||
$session = new Session();
|
||||
|
||||
@@ -11,10 +11,6 @@ $DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
if ($DEBUG_ALL) {
|
||||
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
||||
// basic class test file
|
||||
@@ -33,9 +29,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$locale = \CoreLibs\Language\GetLocale::setLocale();
|
||||
$l10n = new \CoreLibs\Language\L10n(
|
||||
@@ -43,7 +39,12 @@ $l10n = new \CoreLibs\Language\L10n(
|
||||
$locale['domain'],
|
||||
$locale['path'],
|
||||
);
|
||||
$smarty = new CoreLibs\Template\SmartyExtend($l10n, $locale);
|
||||
$smarty = new CoreLibs\Template\SmartyExtend(
|
||||
$l10n,
|
||||
$locale,
|
||||
CACHE_ID,
|
||||
COMPILE_ID,
|
||||
);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: SMARTY';
|
||||
print "<!DOCTYPE html>";
|
||||
@@ -59,7 +60,7 @@ $smarty->CSS_SPECIAL_TEMPLATE_NAME = 'smart_test.css';
|
||||
$smarty->USE_PROTOTYPE = false;
|
||||
$smarty->USE_JQUERY = true;
|
||||
$smarty->JS_DATEPICKR = false;
|
||||
if ($smarty->USE_PROTOTYPE) {
|
||||
if ($smarty->USE_PROTOTYPE) { /** @phpstan-ignore-line for debug purpose */
|
||||
$smarty->ADMIN_JAVASCRIPT = 'edit.pt.js';
|
||||
$smarty->JS_SPECIAL_TEMPLATE_NAME = 'prototype.test.js';
|
||||
} elseif ($smarty->USE_JQUERY) {
|
||||
@@ -67,7 +68,17 @@ if ($smarty->USE_PROTOTYPE) {
|
||||
$smarty->JS_SPECIAL_TEMPLATE_NAME = 'jquery.test.js';
|
||||
}
|
||||
$smarty->PAGE_WIDTH = '100%';
|
||||
$smarty->setSmartyPaths();
|
||||
$smarty->setSmartyPaths(
|
||||
BASE . INCLUDES,
|
||||
BASE . INCLUDES . TEMPLATES . CONTENT_PATH,
|
||||
LAYOUT . JS,
|
||||
LAYOUT . CSS,
|
||||
LAYOUT . FONT,
|
||||
LAYOUT . IMAGES,
|
||||
LAYOUT . CACHE,
|
||||
ROOT . LAYOUT . CACHE,
|
||||
null // master template name optional
|
||||
);
|
||||
|
||||
// smarty test
|
||||
$smarty->DATA['SMARTY_TEST'] = 'Test Data';
|
||||
@@ -122,7 +133,18 @@ $smarty->DATA['checkbox_test_selected'] = ['1', '-1'];
|
||||
$smarty->DATA['checkbox_test_pos_selected'] = ['0', '-1'];
|
||||
|
||||
|
||||
$smarty->setSmartyVarsAdmin();
|
||||
$smarty->setSmartyVarsAdmin(
|
||||
BASE . TEMPLATES_C,
|
||||
BASE . CACHE,
|
||||
CSS,
|
||||
FONT,
|
||||
JS,
|
||||
DEFAULT_ENCODING,
|
||||
G_TITLE,
|
||||
ADMIN_STYLESHEET,
|
||||
ADMIN_JAVASCRIPT,
|
||||
PAGE_WIDTH
|
||||
);
|
||||
|
||||
// error message
|
||||
print $log->printErrorMsg();
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -27,9 +23,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$byte_class = 'CoreLibs\Convert\Strings';
|
||||
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -34,9 +30,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: SYSTEM';
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -31,9 +27,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$_token = new CoreLibs\Output\Form\Token();
|
||||
$token_class = 'CoreLibs\Output\Form\Token';
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -31,9 +27,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
$_uids = new CoreLibs\Create\Uids();
|
||||
use CoreLibs\Create\Uids;
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
|
||||
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);
|
||||
}
|
||||
$DEBUG_ALL_OVERRIDE = false; // set to 1 to debug on live/remote server locations
|
||||
$DEBUG_ALL = true;
|
||||
$PRINT_ALL = true;
|
||||
$DB_DEBUG = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -35,9 +31,9 @@ $log = new CoreLibs\Debug\Logging([
|
||||
// add file date
|
||||
'print_file_date' => true,
|
||||
// set debug and print flags
|
||||
'debug_all' => $DEBUG_ALL ?? false,
|
||||
'debug_all' => $DEBUG_ALL,
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL,
|
||||
]);
|
||||
|
||||
$PAGE_NAME = 'TEST CLASS: CONVERT\VARISTYPE';
|
||||
|
||||
Reference in New Issue
Block a user