|
0
|
1 |
<?php
|
|
|
2 |
|
|
|
3 |
require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
|
|
|
4 |
|
|
|
5 |
use Symfony\Component\ClassLoader\UniversalClassLoader;
|
|
|
6 |
use Doctrine\Common\Annotations\AnnotationRegistry;
|
|
|
7 |
|
|
|
8 |
$loader = new UniversalClassLoader();
|
|
|
9 |
$loader->registerNamespaces(array(
|
|
|
10 |
'Symfony\\Tests' => __DIR__.'/tests',
|
|
|
11 |
'Symfony' => __DIR__.'/src',
|
|
|
12 |
'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib',
|
|
|
13 |
'Doctrine\\DBAL' => __DIR__.'/vendor/doctrine-dbal/lib',
|
|
|
14 |
'Doctrine' => __DIR__.'/vendor/doctrine/lib',
|
|
|
15 |
'Monolog' => __DIR__.'/vendor/monolog/src',
|
|
|
16 |
));
|
|
|
17 |
$loader->registerPrefixes(array(
|
|
|
18 |
'Twig_' => __DIR__.'/vendor/twig/lib',
|
|
|
19 |
));
|
|
|
20 |
if (!function_exists('intl_get_error_code')) {
|
|
|
21 |
require_once __DIR__.'/src/Symfony/Component/Locale/Resources/stubs/functions.php';
|
|
|
22 |
|
|
|
23 |
$loader->registerPrefixFallbacks(array(__DIR__.'/src/Symfony/Component/Locale/Resources/stubs'));
|
|
|
24 |
}
|
|
|
25 |
$loader->register();
|
|
|
26 |
|
|
|
27 |
AnnotationRegistry::registerLoader(function($class) use ($loader) {
|
|
|
28 |
$loader->loadClass($class);
|
|
|
29 |
return class_exists($class, false);
|
|
|
30 |
});
|
|
|
31 |
AnnotationRegistry::registerFile(__DIR__.'/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
|
|
|
32 |
|
|
|
33 |
if (is_file(__DIR__.'/vendor/swiftmailer/lib/classes/Swift.php')) {
|
|
|
34 |
require_once __DIR__.'/vendor/swiftmailer/lib/classes/Swift.php';
|
|
|
35 |
Swift::registerAutoload(__DIR__.'/vendor/swiftmailer/lib/swift_init.php');
|
|
|
36 |
}
|