forked from lexik/LexikFormFilterBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoload.php.dist
More file actions
42 lines (34 loc) · 1.81 KB
/
autoload.php.dist
File metadata and controls
42 lines (34 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
require_once __DIR__.'/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'Symfony' => __DIR__.'/vendor/symfony/symfony/src',
'Doctrine\\Common\\Annotations' => __DIR__.'/vendor/doctrine/annotations/lib',
'Doctrine\\Common' => __DIR__.'/vendor/doctrine/common/lib',
'Doctrine\\DBAL' => __DIR__.'/vendor/doctrine/dbal/lib',
'Doctrine\\Common\\Cache' => __DIR__.'/vendor/doctrine/cache/lib',
'Doctrine\\Common\\Lexer' => __DIR__.'/vendor/doctrine/lexer/lib',
'Doctrine\\Common\\Collections' => __DIR__.'/vendor/doctrine/collections/lib',
'Doctrine\\ORM' => __DIR__.'/vendor/doctrine/orm/lib',
));
use Doctrine\Common\Annotations\AnnotationRegistry;
if (!function_exists('intl_get_error_code')) {
require_once __DIR__.'/vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
$loader->registerPrefixFallbacks(array(__DIR__.'/vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs'));
}
$loader->register();
AnnotationRegistry::registerLoader(function($class) use ($loader) {
$loader->loadClass($class);
return class_exists($class, false);
});
AnnotationRegistry::registerFile(__DIR__.'/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
spl_autoload_register(function($class) {
$class = ltrim($class, '\\');
if (0 === strpos($class, 'Lexik\Bundle\FormFilterBundle\\')) {
$file = __DIR__.'/'.str_replace('\\', '/', substr($class, strlen('Lexik\Bundle\FormFilterBundle\\'))).'.php';
if (file_exists($file)) {
require $file;
}
}
});