PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets / 4.9.5
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets v4.9.5
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / autoloader.php
shopengine Last commit date
assets 1 week ago base 1 week ago compatibility 1 week ago core 1 week ago languages 1 week ago libs 1 week ago modules 1 week ago traits 3 years ago utils 1 week ago widgets 1 week ago woocommerce 1 year ago autoloader.php 4 years ago phpcs.xml 3 years ago plugin.php 1 week ago readme.txt 1 week ago shopengine.php 1 week ago
autoloader.php
65 lines
1 <?php
2
3 namespace ShopEngine;
4
5
6 defined('ABSPATH') || exit;
7
8 /**
9 * ShopEngine autoloader.
10 * Handles dynamically loading classes only when needed.
11 *
12 * @since 1.0.0
13 */
14 class Autoloader
15 {
16
17 /**
18 * Run autoloader.
19 * Register a function as `__autoload()` implementation.
20 *
21 * @since 1.0.0
22 * @access public
23 */
24 public static function run() {
25 spl_autoload_register([__CLASS__, 'autoload']);
26 }
27
28
29 /**
30 *
31 * @param $class_name
32 */
33 private static function autoload($class_name) {
34
35 if(0 !== strpos($class_name, __NAMESPACE__)) {
36 return;
37 }
38
39 $file_name = strtolower(
40 preg_replace(
41 ['/\b' . __NAMESPACE__ . '\\\/', '/([a-z])([A-Z])/', '/_/', '/\\\/'],
42 ['', '$1-$2', '-', DIRECTORY_SEPARATOR],
43 $class_name
44 )
45 );
46
47
48 $file = plugin_dir_path(__FILE__) . $file_name . '.php';
49
50 if(file_exists($file)) {
51
52 require_once($file);
53 }
54 }
55 }
56
57
58 /**
59 * Calling the autoloader to class files
60 *
61 */
62 Autoloader::run();
63
64
65