2010-06-06 09:35:20 +01:00
|
|
|
<?php
|
|
|
|
|
2011-01-27 12:58:21 +00:00
|
|
|
require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
|
2010-06-06 09:35:20 +01:00
|
|
|
|
2011-01-27 15:47:22 +00:00
|
|
|
use Symfony\Component\ClassLoader\UniversalClassLoader;
|
2011-07-03 15:44:01 +01:00
|
|
|
use Doctrine\Common\Annotations\AnnotationRegistry;
|
2010-06-06 09:35:20 +01:00
|
|
|
|
|
|
|
$loader = new UniversalClassLoader();
|
|
|
|
$loader->registerNamespaces(array(
|
2011-04-28 09:08:16 +01:00
|
|
|
'Symfony\\Tests' => __DIR__.'/tests',
|
|
|
|
'Symfony' => __DIR__.'/src',
|
|
|
|
'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib',
|
|
|
|
'Doctrine\\DBAL' => __DIR__.'/vendor/doctrine-dbal/lib',
|
|
|
|
'Doctrine' => __DIR__.'/vendor/doctrine/lib',
|
|
|
|
'Monolog' => __DIR__.'/vendor/monolog/src',
|
2010-06-06 09:35:20 +01:00
|
|
|
));
|
|
|
|
$loader->registerPrefixes(array(
|
2011-06-11 08:20:01 +01:00
|
|
|
'Twig_' => __DIR__.'/vendor/twig/lib',
|
2010-06-06 09:35:20 +01:00
|
|
|
));
|
2011-07-20 13:26:39 +01:00
|
|
|
if (!function_exists('intl_get_error_code')) {
|
|
|
|
require_once __DIR__.'/src/Symfony/Component/Locale/Resources/stubs/functions.php';
|
|
|
|
|
|
|
|
$loader->registerPrefixFallbacks(array(__DIR__.'/src/Symfony/Component/Locale/Resources/stubs'));
|
|
|
|
}
|
2011-05-31 08:28:29 +01:00
|
|
|
$loader->register();
|
2011-06-11 08:20:01 +01:00
|
|
|
|
2011-07-03 15:44:01 +01:00
|
|
|
AnnotationRegistry::registerLoader(function($class) use ($loader) {
|
|
|
|
$loader->loadClass($class);
|
|
|
|
return class_exists($class, false);
|
|
|
|
});
|
|
|
|
AnnotationRegistry::registerFile(__DIR__.'/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
|
|
|
|
|
2011-06-14 20:57:58 +01:00
|
|
|
if (is_file(__DIR__.'/vendor/swiftmailer/lib/classes/Swift.php')) {
|
|
|
|
require_once __DIR__.'/vendor/swiftmailer/lib/classes/Swift.php';
|
|
|
|
Swift::registerAutoload(__DIR__.'/vendor/swiftmailer/lib/swift_init.php');
|
|
|
|
}
|