refactor(autoload): migrate theme classes to Composer PSR-4
Move 288 types from global AKSRT_* + inc/classes manual requires into
namespace AKSRT\{Domain} under src/AKSRT/, wire composer.json psr-4,
and slim bootstrap to helpers/modules/hooks only. Split multi-class
widget/gateway files, update admin contract audit paths, and document
the layout in ADR/README.
This commit is contained in:
1 parent
8f349b40fb
commit
aaf458af1c
404 files changed
+13602
-7705
No files matched your search
@@ -22,8 +22,8 @@ if (!function_exists('aksrt_user_credits')) {
|
||||
function aksrt_user_credits(int $user_id = 0): int {
|
||||
if ($user_id <= 0) $user_id = get_current_user_id();
|
||||
if ($user_id <= 0) return 0;
|
||||
if (!class_exists('AKSRT_Credits')) return 0;
|
||||
return AKSRT_Credits::balance($user_id);
|
||||
if (!class_exists('\AKSRT\Credits\Credits')) return 0;
|
||||
return \AKSRT\Credits\Credits::balance($user_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ if (!function_exists('aksrt_credits_label')) {
|
||||
if (isset($map[$reason])) {
|
||||
return $map[$reason];
|
||||
}
|
||||
if (str_starts_with($reason, 'free_') && class_exists('AKSRT_Points_Free')) {
|
||||
if (str_starts_with($reason, 'free_') && class_exists('\AKSRT\Credits\PointsFree')) {
|
||||
$key = substr($reason, 5);
|
||||
$cat = AKSRT_Points_Free::catalog();
|
||||
$cat = \AKSRT\Credits\PointsFree::catalog();
|
||||
if (isset($cat[$key][0])) {
|
||||
return (string) $cat[$key][0];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user