1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-23 09:34:00 +01:00
guzzle/build/autoload.php
2011-07-07 17:17:28 -05:00

22 lines
701 B
PHP

<?php
/**
* Autoloader stub for guzzle.phar to autoload Guzzle\* classes.
*
* Note: this autoloader does not load other PSR-0 libraries. If you need to
* autoload other libraries, we recommend the Symfony ClassLoader component.
*/
spl_autoload_register(function($class) {
if (0 === strpos($class, 'Guzzle\\')) {
if ('\\' != DIRECTORY_SEPARATOR) {
$class = 'phar://' . __FILE__ . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
} else {
$class = 'phar://' . __FILE__ . DIRECTORY_SEPARATOR . $class . '.php';
}
if (file_exists($class)) {
require $class;
}
}
});
__HALT_COMPILER();