|
0
|
1 |
<?php |
|
|
2 |
|
|
|
3 |
use Symfony\Component\ClassLoader\UniversalClassLoader; |
|
|
4 |
use Doctrine\Common\Annotations\AnnotationRegistry; |
|
|
5 |
|
|
|
6 |
$loader = new UniversalClassLoader(); |
|
|
7 |
$loader->registerNamespaces(array( |
|
10
|
8 |
'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'), |
|
|
9 |
'Sensio' => __DIR__.'/../vendor/bundles', |
|
|
10 |
'JMS' => __DIR__.'/../vendor/bundles', |
|
|
11 |
'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib', |
|
|
12 |
'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib', |
|
|
13 |
'Doctrine' => __DIR__.'/../vendor/doctrine/lib', |
|
|
14 |
'Monolog' => __DIR__.'/../vendor/monolog/src', |
|
|
15 |
'Assetic' => __DIR__.'/../vendor/assetic/src', |
|
|
16 |
'Metadata' => __DIR__.'/../vendor/metadata/src', |
|
|
17 |
'FOS' => __DIR__.'/../vendor/bundles', |
|
|
18 |
'IRI\Bundle\WikiTagBundle' => __DIR__.'/../vendor/bundles', |
|
0
|
19 |
)); |
|
|
20 |
$loader->registerPrefixes(array( |
|
|
21 |
'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib', |
|
|
22 |
'Twig_' => __DIR__.'/../vendor/twig/lib', |
|
|
23 |
)); |
|
|
24 |
|
|
|
25 |
// intl |
|
|
26 |
if (!function_exists('intl_get_error_code')) { |
|
|
27 |
require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php'; |
|
|
28 |
|
|
|
29 |
$loader->registerPrefixFallbacks(array(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs')); |
|
|
30 |
} |
|
|
31 |
|
|
|
32 |
$loader->registerNamespaceFallbacks(array( |
|
|
33 |
__DIR__.'/../src', |
|
|
34 |
)); |
|
|
35 |
$loader->register(); |
|
|
36 |
|
|
|
37 |
AnnotationRegistry::registerLoader(function($class) use ($loader) { |
|
|
38 |
$loader->loadClass($class); |
|
|
39 |
return class_exists($class, false); |
|
|
40 |
}); |
|
|
41 |
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'); |
|
|
42 |
|
|
|
43 |
// Swiftmailer needs a special autoloader to allow |
|
|
44 |
// the lazy loading of the init file (which is expensive) |
|
|
45 |
require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php'; |
|
|
46 |
Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php'); |
|
|
47 |
|