| author | ymh <ymh.work@gmail.com> |
| Thu, 06 Oct 2011 10:22:59 +0200 | |
| changeset 8 | 062b0cefef7e |
| parent 3 | e54dfe4d0b2b |
| child 15 | 99ad73ef7385 |
| permissions | -rwxr-xr-x |
| 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( |
|
|
8
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
8 |
'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'), |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
9 |
'Sensio' => __DIR__.'/../vendor/bundles', |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
10 |
'JMS' => __DIR__.'/../vendor/bundles', |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
11 |
'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib', |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
12 |
'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib', |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
13 |
'Doctrine' => __DIR__.'/../vendor/doctrine/lib', |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
14 |
'Monolog' => __DIR__.'/../vendor/monolog/src', |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
15 |
'Assetic' => __DIR__.'/../vendor/assetic/src', |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
16 |
'Metadata' => __DIR__.'/../vendor/metadata/src', |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
17 |
'FOS' => __DIR__.'/../vendor/bundles', |
|
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
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 |