| Server IP : 145.239.37.162 / Your IP : 216.73.217.174 Web Server : Apache System : Linux webm003.cluster130.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaa ( 38250) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaa/www_old/wp-content/plugins/cookie-law-info/ |
Upload File : |
<?php
/**
* Custom autoloader
*
* @package CookieYes
*/
namespace CookieYes\Lite;
/**
* Custom class autoloader class
*/
class Autoloader {
/**
* Autoloader function
*
* @return void
*/
public function register() {
spl_autoload_register( array( __CLASS__, 'load_class' ) );
}
/**
* Custom Class Loader For Boiler Plate
*
* @param string $class_name Class names.
* @return void
*/
public static function load_class( $class_name ) {
if ( false === strpos( $class_name, 'CookieYes' ) ) {
return;
}
$file_parts = explode( '\\', $class_name );
$namespace = '';
for ( $i = count( $file_parts ) - 1; $i > 0; $i-- ) {
$current = strtolower( $file_parts[ $i ] );
$current = str_ireplace( '_', '-', $current );
if ( count( $file_parts ) - 1 === $i ) {
$file_name = "class-$current.php";
} else {
$namespace = '/' . $current . $namespace;
}
}
$filepath = dirname( __FILE__ ) . $namespace . '/' . $file_name;
if ( file_exists( $filepath ) ) {
require $filepath;
}
}
}