Skip to content

Instantly share code, notes, and snippets.

@jmikola
Created November 25, 2011 21:50
Show Gist options
  • Save jmikola/1394491 to your computer and use it in GitHub Desktop.
Save jmikola/1394491 to your computer and use it in GitHub Desktop.
<?php
require __DIR__.'/../vendor/.composer/autoload.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
$loader = new UniversalClassLoader();
$loader->registerNamespaceFallbacks(array(__DIR__.'/../src',));
$loader->register();
AnnotationRegistry::registerLoader(function($class) use ($loader) {
$loader->loadClass($class);
return class_exists($class, false);
});
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Mapping/Annotations/DoctrineAnnotations.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment