<?php
umask(0000);

use Symfony\Component\ClassLoader\UniversalClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;

// $loader = new UniversalClassLoader();

/**
 * @var $loader ClassLoader
 */
$loader = require __DIR__.'/../vendor/autoload.php';
$loader->registerNamespaces(array(
  'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
  'Doctrine\\Bundle' => __DIR__.'/../vendor/bundles',
  'Doctrine\\Common\DataFixtures' => __DIR__.'/../vendor/doctrine-fixtures/lib',
  'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
  'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib',
  'Doctrine'       => __DIR__.'/../vendor/doctrine/lib',
  'Monolog'        => __DIR__.'/../vendor/doctrine/src',

  'Gedmo' => __DIR__.'/../vendor/gedmo-doctrine-extensions/lib',
  'Stof'  => __DIR__.'/../vendor/bundles',
));

$loader->register();

AnnotationRegistry::registerLoader(array($loader, 'loadClass'));

AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');


return $loader;
