propelorm/Propel2

View on GitHub
autoload.php.dist

Summary

Maintainability
Test Coverage
<?php

if (file_exists($file = __DIR__.'/vendor/autoload.php')) {
    $loader = require $file;

    $loader->add('Foo', __DIR__ . '/tests/Fixtures/namespaced/build/classes');
    $loader->add('Baz', __DIR__ . '/tests/Fixtures/namespaced/build/classes');
    $loader->add('Propel\Tests', array(
        __DIR__ . '/tests',
        __DIR__ . '/tests/Fixtures/bookstore/build/classes',
        __DIR__ . '/tests/Fixtures/schemas/build/classes',
        __DIR__ . '/tests/Fixtures/quoting/build/classes'
    ));
    $loader->add('Propel\Tests\Fixtures', __DIR__ . '/tests/Fixtures/classes');
    $loader->register();
} elseif (file_exists($file = __DIR__ . '/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php')) {
    require_once $file;

    $loader = new \Symfony\Component\ClassLoader\UniversalClassLoader();
    $loader->registerNamespaces(array(
        'Propel\Common'     => __DIR__ . '/src',
        'Propel\Runtime'    => __DIR__ . '/src',
        'Propel\Generator'  => __DIR__ . '/src',
        'Symfony\Component' => __DIR__ . '/vendor',
        'Monolog'           => __DIR__ . '/vendor/Monolog/src/',
        'Foo'               => __DIR__ . '/tests/Fixtures/namespaced/build/classes',
        'Baz'               => __DIR__ . '/tests/Fixtures/namespaced/build/classes',
        'Propel\Tests'      => array(
            __DIR__ . '/tests',
            __DIR__ . '/tests/Fixtures/bookstore/build/classes',
            __DIR__ . '/tests/Fixtures/schemas/build/classes',
        ),
        'Propel\Tests\Fixtures' => __DIR__ . '/tests/Fixtures/classes',
    ));
    $loader->register();
}