Check that the directory cache exists

This commit is contained in:
Francis Besset
2011-09-10 18:51:04 +02:00
parent 5dc84ef088
commit d0cc3e8bd2
5 changed files with 66 additions and 5 deletions

View File

@ -11,11 +11,18 @@ spl_autoload_register(function($class) {
return true;
}
} else if (0 === strpos($class, 'BeSimple\SoapCommon\\')) {
} elseif (0 === strpos($class, 'BeSimple\SoapCommon\\')) {
$path = __DIR__.'/../src/'.($class = strtr($class, '\\', '/')).'.php';
if (file_exists($path) && is_readable($path)) {
require_once $path;
return true;
}
} elseif (0 === strpos($class, 'vfsStream')) {
$path = __DIR__.'/../vendor/vfsStream/src/main/php/org/bovigo/vfs/'.$class.'.php';
if (file_exists($path) && is_readable($path)) {
require_once $path;
return true;
}
}