diff --git a/www/admin/class_test.admin.backend.php b/www/admin/class_test.admin.backend.php
index 87140bca..6b17bc0e 100644
--- a/www/admin/class_test.admin.backend.php
+++ b/www/admin/class_test.admin.backend.php
@@ -41,8 +41,9 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
-$backend = new CoreLibs\Admin\Backend(DB_CONFIG, $log);
+// db config with logger
+$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
+$backend = new CoreLibs\Admin\Backend($db, $log);
print "
TEST CLASS: ADMIN BACKEND";
print "";
diff --git a/www/admin/class_test.array.php b/www/admin/class_test.array.php
index 192edf89..b3117940 100644
--- a/www/admin/class_test.array.php
+++ b/www/admin/class_test.array.php
@@ -42,7 +42,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
// $_array = new CoreLibs\Combined\ArrayHandler();
// $array_class = 'CoreLibs\Combination\ArrayHandler';
@@ -113,9 +112,6 @@ print "FLATTENARRAYKEY: " . DgS::printAr(ArrayHandler::flattenArrayKey($test_arr
// flatten for key set
print "ARRAYFLATFORKEY: " . DgS::printAr(ArrayHandler::arrayFlatForKey($test_array, 'type')) . "
";
-// DEPRECATED
-// print "ARRAYMERGERECURSIVE: ".DgS::printAr($basic->arrayMergeRecursive($array_1, $array_2, $array_3))."
";
-
/**
* attach key/value to an array so it becomes nested
*
diff --git a/www/admin/class_test.byte.php b/www/admin/class_test.byte.php
index f8ad47cf..02f58b91 100644
--- a/www/admin/class_test.byte.php
+++ b/www/admin/class_test.byte.php
@@ -41,7 +41,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$byte_class = 'CoreLibs\Convert\Byte';
print "TEST CLASS: BYTE CONVERT";
@@ -107,12 +106,6 @@ foreach ($bytes as $byte) {
print "";
}
-// DEPRECATED
-/* $byte = 254779258;
-$string = '242.98 MB';
-print "BYTE TO: $byte: ".$basic->humanReadableByteFormat($byte)."
";
-print "BYTE FROM: $string: ".$basic->stringByteFormat($string)."
"; */
-
// error message
print $log->printErrorMsg();
diff --git a/www/admin/class_test.colors.php b/www/admin/class_test.colors.php
index d3a1b627..63fbee94 100644
--- a/www/admin/class_test.colors.php
+++ b/www/admin/class_test.colors.php
@@ -42,7 +42,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$color_class = 'CoreLibs\Convert\Colors';
print "TEST CLASS: COLORS";
diff --git a/www/admin/class_test.datetime.php b/www/admin/class_test.datetime.php
index 23b1b0c1..45e11201 100644
--- a/www/admin/class_test.datetime.php
+++ b/www/admin/class_test.datetime.php
@@ -42,7 +42,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$datetime_class = 'CoreLibs\Combined\DateTime';
print "TEST CLASS: DATE/TIME";
@@ -141,27 +140,6 @@ foreach ($compare_dates as $compare_date) {
. DgS::printAr(DateTime::calcDaysInterval($compare_date[0], $compare_date[1], true)) . "
";
}
-// DEPRECATED
-/* $timestamp = 1622788315.123456;
-print "C->DATESTRINGFORMAT(sm:0): $timestamp: ".$basic->dateStringFormat($timestamp)."
";
-$interval = 788315.123456;
-$reverse_interval = $basic->timeStringFormat($interval);
-print "TIMESTRINGFORMAT(sm:1): $interval: ".$reverse_interval."
";
-print "STRINGTOTIME: $reverse_interval: ".$basic->stringToTime($reverse_interval)."
";
-$check_date = '2021-05-01';
-print "CHECKDATE: $check_date: ".(string)$basic->checkDate($check_date)."
";
-$check_datetime = '2021-05-01 12:13:14';
-print "CHECKDATETIME: $check_datetime: ".(string)$basic->checkDateTime($check_datetime)."
";
-$compare_date = ['2021-05-01', '2021-05-02'];
-print "COMPAREDATE: $compare_date[0] = $compare_date[1]: "
- . (string)$basic->compareDate($compare_date[0], $compare_date[1])."
";
-$compare_datetime = ['2021-05-01 10:00:00', '2021-05-01 11:00:00'];
-print "COMPAREDATE: $compare_datetime[0] = $compare_datetime[1]: "
- . (string)$basic->compareDateTime($compare_datetime[0], $compare_datetime[1])."
";
-$compare_date = ['2021-05-01', '2021-05-10'];
-print "CALCDAYSINTERVAL(named): $compare_date[0] = $compare_date[1]: "
- . DgS::printAr($basic->calcDaysInterval($compare_date[0], $compare_date[1], true))."
"; */
-
// error message
print $log->printErrorMsg();
diff --git a/www/admin/class_test.db.php b/www/admin/class_test.db.php
index cc364d02..1687ebc5 100644
--- a/www/admin/class_test.db.php
+++ b/www/admin/class_test.db.php
@@ -35,11 +35,8 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-// $basic = new CoreLibs\Basic($log, EDIT_SESSION_NAME);
-//start session
-\CoreLibs\Create\Session::startSession(EDIT_SESSION_NAME);
// db connection and attach logger
-$db = new CoreLibs\Admin\Backend(DB_CONFIG, $log);
+$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
$db->log->debug('START', '=============================>');
print "TEST CLASS: DB";
diff --git a/www/admin/class_test.debug.php b/www/admin/class_test.debug.php
index d5c64b0f..a3309f19 100644
--- a/www/admin/class_test.debug.php
+++ b/www/admin/class_test.debug.php
@@ -34,7 +34,6 @@ $ECHO_ALL = true;
use CoreLibs\Debug\Support as DebugSupport;
use CoreLibs\Debug\FileWriter;
-$basic = new CoreLibs\Basic();
$debug = new CoreLibs\Debug\Logging([
'log_folder' => BASE . LOG,
'file_id' => $LOG_FILE_ID,
@@ -161,29 +160,9 @@ class AttachOutside
return get_class($this);
}
}
-$ao = new AttachOutside($basic->log);
+$ao = new AttachOutside($debug);
print "AO-CLASS: DEBUG: " . $ao->test() . "
";
-// @codingStandardsIgnoreLine
-class AttachFull
-{
- public $main;
- public function __construct(object $class)
- {
- $this->main = $class;
- }
- public function test()
- {
- // should trigger deprecated
- return $this->main->rgb2hex(2, 3, 4);
- }
-}
-
-$af = new AttachFull($basic);
-// should trigger deprecated
-print "DEPREACTEDTEST: " . $af->test() . "
";
-
-
print "GETCALLERCLASS(NON CLASS): " . \CoreLibs\Debug\Support::getCallerClass() . "
";
// fdebug
@@ -192,9 +171,9 @@ print "S::FDEBUG: " . FileWriter::fdebug('CLASS TEST DEBUG FILE: ' . date('Y-m-d
// error message
// future DEPRECATED
-// $basic->debug('BASIC CLASS', 'Debug test');
-$basic->log->debug('BASIC CLASS', 'Debug test');
-print "BASIC PRINTERRORMSG:
" . $basic->log->printErrorMsg();
+// $debug->debug('BASIC CLASS', 'Debug test');
+$debug->debug('BASIC CLASS', 'Debug test');
+print "BASIC PRINTERRORMSG:
" . $debug->printErrorMsg();
print "";
diff --git a/www/admin/class_test.email.php b/www/admin/class_test.email.php
index 15efcb44..26e8d433 100644
--- a/www/admin/class_test.email.php
+++ b/www/admin/class_test.email.php
@@ -42,7 +42,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
print "TEST CLASS: HTML/ELEMENTS";
print "";
@@ -81,11 +80,6 @@ foreach ($email as $s_email) {
print "S::CHECKEMAILFULL: " . $s_email . ": " . Dgs::printAr(Email::checkEmailFull($s_email)) . "
";
print "S::CHECKEMAILFULL(true): " . $s_email . ": " . Dgs::printAr(Email::checkEmailFull($s_email, true)) . "
";
}
-// DEPRECATED
-/* foreach ($email as $s_email) {
- print "D/S-EMAIL: $s_email: ".$basic->getEmailType($s_email)."
";
- print "D/S-EMAIL SHORT: $s_email: ".$basic->getEmailType($s_email, true)."
";
-} */
// error message
print $log->printErrorMsg();
diff --git a/www/admin/class_test.encoding.php b/www/admin/class_test.encoding.php
index 196aa555..14cdd11e 100644
--- a/www/admin/class_test.encoding.php
+++ b/www/admin/class_test.encoding.php
@@ -41,7 +41,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$_encoding = new CoreLibs\Language\Encoding();
$encoding_class = 'CoreLibs\Language\Encoding';
@@ -49,7 +48,7 @@ print "TEST CLASS: ENCODING";
print "";
print '';
-// print "Valid encoding: ".$basic->printAr(mb_list_encodings())."
";
+// print "Valid encoding: ".$log->printAr(mb_list_encodings())."
";
$mime_encodes = [
['Simple string UTF8', 'UTF-8'],
@@ -96,12 +95,6 @@ $_string = $enc_strings[1];
$string = Encoding::checkConvertEncoding($_string, 'UTF-8', 'ISO-2022-JP-MS');
print "S::ENC CHECK: $_string: " . ($string === false ? '-OK-' : $string) . "
";
-// DEPRECATED
-/* $string = $basic->checkConvertEncoding($_string, 'UTF-8', 'ISO-2022-JP-MS');
-print "ENC CHECK: $_string: ".($string === false ? '-OK-' : $string)."
";
-print "CONV ENCODING: $_string: ".$basic->convertEncoding($_string, 'ISO-2022-JP')."
";
-print "D/__MBMIMEENCODE: ".$basic->__mbMimeEncode('Some Text', 'UTF-8')."
"; */
-
// error message
print $log->printErrorMsg();
diff --git a/www/admin/class_test.file.php b/www/admin/class_test.file.php
index cb0112d0..19e3021e 100644
--- a/www/admin/class_test.file.php
+++ b/www/admin/class_test.file.php
@@ -41,7 +41,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
print "TEST CLASS: FILE";
print "";
diff --git a/www/admin/class_test.hash.php b/www/admin/class_test.hash.php
index fb96b9a6..4d922e83 100644
--- a/www/admin/class_test.hash.php
+++ b/www/admin/class_test.hash.php
@@ -41,7 +41,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$hash_class = 'CoreLibs\Create\Hash';
// define a list of from to color sets for conversion test
@@ -71,11 +70,6 @@ print "HASH LONG: " . $to_crc . ": " . Hash::__hashLong($to_crc) . "
";
// print "UNIQU ID SHORT : " . Hash::__uniqId() . "
";
// print "UNIQU ID LONG : " . Hash::__uniqIdLong() . "
";
-// DEPRECATED
-/* print "D/__CRC32B: $to_crc: ".$basic->__crc32b($to_crc)."
";
-print "D/__SHA1SHORT(off): $to_crc: ".$basic->__sha1short($to_crc)."
";
-print "D/__hash(d): $to_crc: ".$basic->__hash($to_crc)."
"; */
-
// error message
print $log->printErrorMsg();
diff --git a/www/admin/class_test.html.php b/www/admin/class_test.html.php
index 23916d84..3c260e64 100644
--- a/www/admin/class_test.html.php
+++ b/www/admin/class_test.html.php
@@ -42,7 +42,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$_html = new CoreLibs\Convert\Html();
$_elements = new CoreLibs\Output\Form\Elements();
$html_class = 'CoreLibs\Convert\Html';
@@ -98,17 +97,6 @@ foreach ($magic_links as $magic_link) {
print "MAGICLINK: " . Html::htmlent($magic_link) . ": " . Html::htmlent(Elements::magicLinks($magic_link)) . "
";
}
-// DEPREACTED
-/* $string = "Deprecated Something < = > Other
Deprecated Next line";
-print "D/HTMLENT: $string: ".$basic->htmlent($string)."
";
-print "D/REMOVELB: $string: ".$basic->removeLB($string)."
";
-$date_str = [2021, 5, 1, 11, 10];
-print "D/PRINTDATETIME: "
- . $basic->printDateTime($date_str[0], $date_str[1], $date_str[2], $date_str[3], $date_str[4])."
";
-$magic_link = 'http://www.somelink.com/?with=1234|Some Title|';
-print "D/MAGICLINK: ".Html::htmlent($basic->magicLinks($magic_link))."
";
-*/
-
$text = 'I am some text
with some
line breaks
diff --git a/www/admin/class_test.image.php b/www/admin/class_test.image.php
index 7c18994f..e014b2b2 100644
--- a/www/admin/class_test.image.php
+++ b/www/admin/class_test.image.php
@@ -41,7 +41,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$_image = new CoreLibs\Output\Image();
$image_class = 'CoreLibs\Output\Image';
@@ -112,15 +111,6 @@ foreach ($images as $image) {
echo "
";
}
-// DEPRECATED
-// static
-/* $image = BASE.LAYOUT.CONTENT_PATH.IMAGES.'no_picture.jpg';
-// rotate image first
-$basic->correctImageOrientation($image);
-// thumbnail tests
-echo "S::CREATETHUMBNAILSIMPLE: ".basename($image).": WIDTH: $thumb_width
.)
"; */
-
// error message
print $log->printErrorMsg();
diff --git a/www/admin/class_test.json.php b/www/admin/class_test.json.php
index 04f753f0..5bc9a752 100644
--- a/www/admin/class_test.json.php
+++ b/www/admin/class_test.json.php
@@ -42,7 +42,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$json_class = 'CoreLibs\Convert\Json';
// define a list of from to color sets for conversion test
@@ -72,12 +71,6 @@ $output = $json_class::jsonConvertToArray($json);
print "J/S::E-JSON: $json: " . DgS::printAr($output) . "
";
print "J/S::E-JSON ERROR: " . $json_class::jsonGetLastError() . ": " . $json_class::jsonGetLastError(true) . "
";
-// DEPRECATE TEST
-/* $json = '["f: {b"""ar}]';
-$output = $basic->jsonConvertToArray($json);
-print "E-JSON: $json: ".DgS::printAr($output)."
";
-print "E-JSON ERROR: ".$basic->jsonGetLastError().": ".$basic->jsonGetLastError(true)."
"; */
-
// $json = '{"foo": "bar"}';
// $output = Jason::jsonConvertToArray($json);
// print "S::JSON: $json: " . DgS::printAr($output) . "
";
diff --git a/www/admin/class_test.math.php b/www/admin/class_test.math.php
index ea6141f0..388219c6 100644
--- a/www/admin/class_test.math.php
+++ b/www/admin/class_test.math.php
@@ -39,7 +39,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$_math = new CoreLibs\Convert\Math();
$math_class = 'CoreLibs\Convert\Math';
@@ -61,11 +60,6 @@ print "S-INITNUMERIC: " . $math_class::initNumeric(123.456) . "
";
print "S-INITNUMERIC: " . $math_class::initNumeric('123') . "
";
print "S-INITNUMERIC: " . $math_class::initNumeric('123.456') . "
";
-// DEPRECATED
-/* print "FCEIL: ".$basic->fceil(5.1234567890, 5)."
";
-print "FLOORP: ".$basic->floorp(5123456, -3)."
";
-print "INITNUMERIC: ".$basic->initNumeric('123')."
"; */
-
// error message
print $log->printErrorMsg();
diff --git a/www/admin/class_test.mime.php b/www/admin/class_test.mime.php
index 6cb95f60..36b28ce3 100644
--- a/www/admin/class_test.mime.php
+++ b/www/admin/class_test.mime.php
@@ -39,7 +39,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$_mime = new CoreLibs\Convert\MimeAppName();
print "TEST CLASS: MIME";
@@ -64,13 +63,6 @@ print "S::App for mime $mime: " . \CoreLibs\Convert\MimeAppName::mimeGetAppName(
$mime = 'application/vnd.ms-excel';
print "S::App for mime $mime: " . \CoreLibs\Convert\MimeAppName::mimeGetAppName($mime) . "
";
-// DEPRECATED
-/* $mime = 'application/illustrator';
-print "MIME $mime: ".$basic->mimeGetAppName($mime)."
";
-$mime = 'fake/mime';
-$basic->mimeSetAppName($mime, 'This is a fake mime');
-print "MIME $mime: ".$basic->mimeGetAppName($mime)."
"; */
-
print $log->printErrorMsg();
print "";
diff --git a/www/admin/class_test.output.form.php b/www/admin/class_test.output.form.php
index 123a5ac8..db86e29b 100644
--- a/www/admin/class_test.output.form.php
+++ b/www/admin/class_test.output.form.php
@@ -67,9 +67,7 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$form = new CoreLibs\Output\Form\Generate(DB_CONFIG, $log);
-// $db = new CoreLibs\DB\IO(DB_CONFIG, $basic->log);
print "TEST CLASS: FORM GENERATE";
print "";
diff --git a/www/admin/class_test.password.php b/www/admin/class_test.password.php
index 73f24a76..a031a23b 100644
--- a/www/admin/class_test.password.php
+++ b/www/admin/class_test.password.php
@@ -41,7 +41,6 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$basic = new CoreLibs\Basic($log);
$_password = new CoreLibs\Check\Password();
$password_class = 'CoreLibs\Check\Password';
@@ -65,13 +64,6 @@ print "PASSWORD REHASH: " . (string)$password_class::passwordRehashCheck($enc_pa
// direct static
print "S::PASSWORD VERFIY: " . (string)PwdChk::passwordVerify($password, $enc_password) . "
";
-// DEPRECATED
-/* $password = 'deprecated4567';
-$enc_password = $basic->passwordSet($password);
-print "PASSWORD: $password: ".$enc_password."
";
-print "PASSWORD VERIFY: ".(string)$basic->passwordVerify($password, $enc_password)."
";
-print "PASSWORD REHASH: ".(string)$basic->passwordRehashCheck($enc_password)."
"; */
-
// error message
print $log->printErrorMsg();
diff --git a/www/admin/class_test.php b/www/admin/class_test.php
index 871c428f..5f10ae75 100644
--- a/www/admin/class_test.php
+++ b/www/admin/class_test.php
@@ -39,9 +39,10 @@ $log = new CoreLibs\Debug\Logging([
'echo_all' => $ECHO_ALL ?? false,
'print_all' => $PRINT_ALL ?? false,
]);
-$login = new CoreLibs\ACL\Login(DB_CONFIG, $log);
-$basic = new CoreLibs\Admin\Backend(DB_CONFIG, $log);
-$basic->dbInfo(true);
+$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
+$login = new CoreLibs\ACL\Login($db, $log);
+$backend = new CoreLibs\Admin\Backend($db, $log);
+$backend->db->dbInfo(true);
ob_end_flush();
print "TEST CLASS";
@@ -86,15 +87,15 @@ if (is_object($login) && isset($login->acl['unit'])) {
print "ACL UNIT: " . print_r(array_keys($login->acl['unit']), true) . "
";
print "ACCESS CHECK: " . (string)$login->loginCheckEditAccess($edit_access_id) . "
";
if ($login->loginCheckEditAccess($edit_access_id)) {
- $basic->edit_access_id = $edit_access_id;
+ $backend->edit_access_id = $edit_access_id;
} else {
- $basic->edit_access_id = $login->acl['unit_id'];
+ $backend->edit_access_id = $login->acl['unit_id'];
}
} else {
print "Something went wrong with the login
";
}
-// $basic->log->debug('SESSION', \CoreLibs\Debug\Support::printAr($_SESSION));
+// $backend->log->debug('SESSION', \CoreLibs\Debug\Support::printAr($_SESSION));
print '