PluginProbe ʕ •ᴥ•ʔ
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) / 9.5.7
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) v9.5.7
9.5.11 9.5.10.1 9.5.10 trunk 9.4.0 9.4.1 9.4.2 9.4.3 9.5.0 9.5.0.1 9.5.0.2 9.5.1 9.5.2 9.5.2.2 9.5.2.3 9.5.3 9.5.3.1 9.5.3.2 9.5.4 9.5.5 9.5.6 9.5.7 9.5.8 9.5.9
really-simple-ssl / rsssl-auto-loader.php
really-simple-ssl Last commit date
assets 3 months ago core 3 months ago languages 3 months ago lets-encrypt 4 months ago lib 6 months ago mailer 7 months ago modal 3 months ago placeholders 9 months ago progress 1 year ago security 3 months ago settings 3 months ago testssl 5 years ago upgrade 7 months ago .wp-env.json 10 months ago SECURITY.md 9 months ago class-admin.php 3 months ago class-cache.php 4 months ago class-certificate.php 2 years ago class-front-end.php 6 months ago class-installer.php 10 months ago class-mixed-content-fixer.php 3 years ago class-multisite.php 4 months ago class-server.php 4 months ago class-site-health.php 1 year ago class-wp-cli.php 5 months ago compatibility.php 1 year ago force-deactivate.txt 1 year ago functions.php 5 months ago index.php 2 years ago readme.txt 3 months ago rector.php 1 year ago rlrsssl-really-simple-ssl.php 3 months ago rsssl-auto-loader.php 1 year ago sbom.json.gz 3 months ago ssl-test-page.php 2 years ago system-status.php 8 months ago uninstall.php 4 months ago upgrade.php 4 months ago
rsssl-auto-loader.php
56 lines
1 <?php
2 /**
3 * This file manages to autoload of the classes in the pro folder.
4 *
5 * @package REALLY_SIMPLE_SSL
6 */
7 spl_autoload_register(
8 static function ($the_class) {
9 // project-specific namespace prefix.
10 $prefix = 'RSSSL\\';
11
12 // base directory for the namespace prefix.
13 $base_dir = rsssl_path;
14
15 // does the class use the namespace prefix?
16 $len = strlen($prefix);
17 if (0 !== strncmp($prefix, $the_class, $len)) {
18 return;
19 }
20 // get the relative class name.
21 $relative_class = substr($the_class, $len);
22 $relative_class = strtolower($relative_class);
23 // converting backslashes to slashes, underscores to hyphens.
24 $relative_class = str_replace(array('\\', '_', 'dynamictables'), array(
25 '/',
26 '-',
27 'dynamic-tables'
28 ), $relative_class); // New Line: handle the case of 'dynamic tables' to 'dynamic-tables' This is placeholder fix for now.
29
30 $file = $base_dir . $relative_class; // old way to form filename.
31 // $file = preg_replace('{/([^/]+)$}', '/class-$1.php', $file); // new way to form filename.
32
33 if (strpos($relative_class, 'trait') !== false) {
34 $file = preg_replace('{/([^/]+)$}', '/trait-$1.php', $file);
35 } elseif (strpos($relative_class, 'interface') !== false) {
36 $file = preg_replace('{/([^/]+)$}', '/interface-$1.php', $file);
37 } else {
38 $file = preg_replace('{/([^/]+)$}', '/class-$1.php', $file);
39 }
40
41 // if(str_contains(strtolower($the_class), 'trait')) {
42 // var_dump(file_exists($file));
43 // var_dump($file);
44 // die('now');
45 // }
46 if (class_exists($the_class)) {
47 return;
48 }
49
50 // if the file exists, require it.
51 if (file_exists($file)) {
52 require_once $file;
53 }
54 }
55 );
56