mirror of
https://github.com/pierre42100/comunic
synced 2024-11-17 02:51:13 +00:00
22 lines
536 B
PHP
22 lines
536 B
PHP
|
<?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);
|
||
|
}
|
||
|
}
|
||
|
});
|