app/autoload.php
author ymh <ymh.work@gmail.com>
Fri, 25 Nov 2011 18:55:43 +0100
changeset 39 03b14b0fe101
parent 32 f166042d4421
child 58 624e5900f5a4
permissions -rwxr-xr-x
Documentation and add alternative wp url and label + migrations
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
use Symfony\Component\ClassLoader\UniversalClassLoader;
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
use Doctrine\Common\Annotations\AnnotationRegistry;
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
$loader = new UniversalClassLoader();
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
$loader->registerNamespaces(array(
39
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
     8
    'Symfony'                    => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
     9
    'Sensio'                     => __DIR__.'/../vendor/bundles',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    10
    'JMS'                        => __DIR__.'/../vendor/bundles',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    11
    'Doctrine\\Common'           => __DIR__.'/../vendor/doctrine-common/lib',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    12
	'Doctrine\\DBAL\\Migrations' => __DIR__.'/../vendor/doctrine-migrations/lib',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    13
    'Doctrine\\DBAL'             => __DIR__.'/../vendor/doctrine-dbal/lib',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    14
    'Doctrine'                   => __DIR__.'/../vendor/doctrine/lib',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    15
    'Monolog'                    => __DIR__.'/../vendor/monolog/src',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    16
    'Assetic'                    => __DIR__.'/../vendor/assetic/src',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    17
    'Metadata'                   => __DIR__.'/../vendor/metadata/src',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    18
    'FOS'                        => __DIR__.'/../vendor/bundles',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    19
	'Pagerfanta'  			     => __DIR__.'/../vendor/bundles',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    20
	'Mandango\Mondator'          => __DIR__.'/../vendor/mondator/src',
03b14b0fe101 Documentation and add alternative wp url and label + migrations
ymh <ymh.work@gmail.com>
parents: 32
diff changeset
    21
	'IRI\Bundle\WikiTagBundle'   => __DIR__.'/../vendor/bundles',
0
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
));
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
$loader->registerPrefixes(array(
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib',
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
    'Twig_'            => __DIR__.'/../vendor/twig/lib',
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
));
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
// intl
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
if (!function_exists('intl_get_error_code')) {
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
    $loader->registerPrefixFallbacks(array(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs'));
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
}
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
$loader->registerNamespaceFallbacks(array(
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
    __DIR__.'/../src',
24
57ff6d39f88c first full dynamic version of the bundle
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    37
    __DIR__.'/cache/dev/wikitag',
57ff6d39f88c first full dynamic version of the bundle
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    38
    __DIR__.'/cache/prod/wikitag',
57ff6d39f88c first full dynamic version of the bundle
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    39
    __DIR__.'/cache/test/wikitag',
32
f166042d4421 add event on tag changed
ymh <ymh.work@gmail.com>
parents: 24
diff changeset
    40
    __DIR__.'/cache/task/wikitag',
0
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
));
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
$loader->register();
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
AnnotationRegistry::registerLoader(function($class) use ($loader) {
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
    $loader->loadClass($class);
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
    return class_exists($class, false);
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
});
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
// Swiftmailer needs a special autoloader to allow
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
// the lazy loading of the init file (which is expensive)
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php';
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php');
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54