| Server IP : 27.254.86.99 / Your IP : 216.73.216.234 Web Server : LiteSpeed System : Linux wp1.hostneverdie.com 4.18.0-553.46.1.lve.el8.x86_64 #1 SMP Wed Apr 2 11:16:45 UTC 2025 x86_64 User : qtccargo ( 1078) PHP Version : 8.2.29 Disable Function : apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd,exec, fp, fput, highlight_file, ini_alter, ini_restore, inject_code, passthru,phpAds_remoteInfo, phpAds_XmlRpc,phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid,posix_setuid, posix_setuid, posix_uname,proc_open,proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode, show_source,pcntl_exec,virtual,suexec,dbmopen,dl,disk_free_space,diskfreespace,leak MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/qtccargo/domains/iamumbrella.com/public_html/wp-content/plugins/apsw/ |
Upload File : |
<?php
/*
Plugin Name: APSW
Description: APSW
Version: 1.0.0
Author: APSW
*/
if (!defined('ABSPATH')) exit;
final class APSW_Plugin_Entry
{
public static function boot(): void
{
self::autoload_src();
// After loading, auto-call ::register() on any new class that defines it.
self::auto_register_modules();
// Activation hook (must be in main plugin file)
register_activation_hook(__FILE__, ['APSW_Install', 'on_activate']);
}
private static function autoload_src(): void
{
$src = plugin_dir_path(__FILE__) . 'src';
if (!is_dir($src)) return;
$before = get_declared_classes();
$it = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($src, FilesystemIterator::SKIP_DOTS)
);
foreach ($it as $file) {
/** @var SplFileInfo $file */
if (!$file->isFile()) continue;
if (strtolower($file->getExtension()) !== 'php') continue;
require_once $file->getPathname();
}
// store class diff for auto register
$after = get_declared_classes();
$GLOBALS['apsw_new_classes'] = array_values(array_diff($after, $before));
}
private static function auto_register_modules(): void
{
$classes = $GLOBALS['apsw_new_classes'] ?? [];
if (!is_array($classes)) return;
foreach ($classes as $cls) {
if (!is_string($cls)) continue;
if (!class_exists($cls)) continue;
if (!method_exists($cls, 'register')) continue;
try {
call_user_func([$cls, 'register']);
} catch (\Throwable $e) {
error_log('[APSW] module register failed: ' . $cls . ' - ' . $e->getMessage());
}
}
}
}
APSW_Plugin_Entry::boot();