mirror of
https://github.com/pierre42100/comunic
synced 2025-06-21 09:35:19 +00:00
First commit
This commit is contained in:
21
developer/vendor/gregwar/image/Gregwar/Image/autoload.php
vendored
Normal file
21
developer/vendor/gregwar/image/Gregwar/Image/autoload.php
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
$vendors = __DIR__.'/vendor/autoload.php';
|
||||
if (file_exists($vendors)) {
|
||||
require($vendors);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers an autoload for all the classes in Gregwar\Image
|
||||
*/
|
||||
spl_autoload_register(function ($className) {
|
||||
$namespace = 'Gregwar\\Image';
|
||||
|
||||
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