BeSimpleSoap/Tests/bootstrap.php
2011-07-14 17:43:37 +02:00

25 lines
720 B
PHP

<?php
require_once $_SERVER['SYMFONY'].'/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespace('Symfony', $_SERVER['SYMFONY']);
$loader->registerNamespace('Zend', $_SERVER['ZEND']);
$loader->register();
spl_autoload_register(function($class) {
//if (0 === strpos($class, 'BeSimple\\SoapBundle\\')) {
if (0 === strpos($class, 'Bundle\\WebServiceBundle\\')) {
$path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
if (file_exists($path)) {
require_once $path;
return true;
}
return false;
}
});