PluginProbe
DoLogin Security / trunk
DoLogin Security vtrunk
5.0.10 4.8.3 trunk 1.0 1.1 1.1.1 1.2 1.2.1 1.2.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 1.6 All 64 releases
dologin / autoload.php

autoload.php in DoLogin Security trunk, at autoload.php

71 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Auto registration
4 *
5 * @since 1.0
6 */
7 defined( 'WPINC' ) || exit;
8
9 $dologin_php_files = array(
10 // core file priority
11 'src/instance.cls.php',
12 'src/secret.cls.php',
13
14 // main src files
15 'src/admin.cls.php',
16 'src/auth.cls.php',
17 'src/captcha.cls.php',
18 'src/cli.cls.php',
19 'src/conf.cls.php',
20 'src/core.cls.php',
21 'src/data.cls.php',
22 'src/f.cls.php',
23 'src/gui.cls.php',
24 'src/installer.cls.php',
25 'src/ip.cls.php',
26 'src/klsso-msgpack.cls.php',
27 'src/klsso-keys.cls.php',
28 'src/klsso-protocol.cls.php',
29 'src/klsso-repair.cls.php',
30 'src/klsso-state.cls.php',
31 'src/klsso-ui.cls.php',
32 'src/klsso.cls.php',
33 'src/lang.cls.php',
34 'src/pswdless.cls.php',
35 'src/rest.cls.php',
36 'src/router.cls.php',
37 'src/s.cls.php',
38 'src/site.cls.php',
39 'src/twofa.cls.php',
40 'src/util.cls.php',
41 );
42 foreach ( $dologin_php_files as $dologin_class ) {
43 $dologin_file = DOLOGIN_DIR . $dologin_class;
44 require_once $dologin_file;
45 }
46
47 if ( ! function_exists( 'dologin_autoload' ) ) {
48 function dologin_autoload( $cls ) {
49 if ( strpos( $cls, 'dologin' ) !== 0 ) {
50 return;
51 }
52
53 $file = explode( '\\', $cls );
54 array_shift( $file );
55 $file = implode( '/', $file );
56 $file = str_replace( '_', '-', strtolower( $file ) );
57
58 if ( strpos( $file, 'lib/' ) === 0 || strpos( $file, 'thirdparty/' ) === 0 ) {
59 $file = DOLOGIN_DIR . $file . '.cls.php';
60 } else {
61 $file = DOLOGIN_DIR . 'src/' . $file . '.cls.php';
62 }
63
64 if ( file_exists( $file ) ) {
65 require_once $file;
66 }
67 }
68 }
69
70 spl_autoload_register( 'dologin_autoload' );
71