BeSimpleSoap/Tests/bootstrap.php

25 lines
716 B
PHP
Raw Normal View History

2011-07-14 17:41:28 +02:00
<?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, 'BeSimple\\SoapBundle\\')) {
2011-07-14 17:41:28 +02:00
$path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
if (file_exists($path)) {
require_once $path;
return true;
}
return false;
}
});