| author | cavaliet |
| Fri, 21 Oct 2011 17:10:54 +0200 | |
| changeset 15 | 99ad73ef7385 |
| parent 8 | 062b0cefef7e |
| child 18 | c85b9d1ddf19 |
| 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', |
|
15
99ad73ef7385
first step for tag list and add Pagerfanta for paginator
cavaliet
parents:
8
diff
changeset
|
18 |
'Pagerfanta' => __DIR__.'/../vendor/bundles', |
|
8
062b0cefef7e
finish installation of the new bundle
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
19 |
'IRI\Bundle\WikiTagBundle' => __DIR__.'/../vendor/bundles', |
| 0 | 20 |
)); |
21 |
$loader->registerPrefixes(array( |
|
22 |
'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib', |
|
23 |
'Twig_' => __DIR__.'/../vendor/twig/lib', |
|
24 |
)); |
|
25 |
||
26 |
// intl |
|
27 |
if (!function_exists('intl_get_error_code')) { |
|
28 |
require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php'; |
|
29 |
||
30 |
$loader->registerPrefixFallbacks(array(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs')); |
|
31 |
} |
|
32 |
||
33 |
$loader->registerNamespaceFallbacks(array( |
|
34 |
__DIR__.'/../src', |
|
35 |
)); |
|
36 |
$loader->register(); |
|
37 |
||
38 |
AnnotationRegistry::registerLoader(function($class) use ($loader) { |
|
39 |
$loader->loadClass($class); |
|
40 |
return class_exists($class, false); |
|
41 |
}); |
|
42 |
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'); |
|
43 |
||
44 |
// Swiftmailer needs a special autoloader to allow |
|
45 |
// the lazy loading of the init file (which is expensive) |
|
46 |
require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php'; |
|
47 |
Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php'); |
|
48 |