mirror of
https://github.com/pierre42100/comunic
synced 2025-06-20 17:15:19 +00:00
First commit
This commit is contained in:
16
developer/vendor/gregwar/cache/Gregwar/Cache/autoload.php
vendored
Normal file
16
developer/vendor/gregwar/cache/Gregwar/Cache/autoload.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Registers an autoload for all the classes in Gregwar\Cache
|
||||
*/
|
||||
spl_autoload_register(function ($className) {
|
||||
$namespace = 'Gregwar\\Cache';
|
||||
|
||||
if (strpos($className, $namespace) === 0) {
|
||||
$className = str_replace($namespace, '', $className);
|
||||
$fileName = __DIR__ . '/' . str_replace('\\', '/', $className) . '.php';
|
||||
if (file_exists($fileName)) {
|
||||
require($fileName);
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user