Permalink
Browse files

Merge pull request #10 from marnusw/annot_registry_namespace

Added the annotation namespace registration with the AnnotationRegistry
  • Loading branch information...
2 parents ee8088a + 27697d1 commit c144db2867efc3b098079a441f3f5285f2f183c3 @beberlei beberlei committed Apr 4, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 en/reference/configuration.rst
@@ -23,7 +23,8 @@ You have to make sure that both dependencies are installed and autoloadable.
The Github checkout comes with a submodule of the Doctrine Common library. It contains
the ``Doctrine\Common\ClassLoader`` which should be used for autoloading all the necessary
-Doctrine classes.
+Doctrine classes. It is also necessary to register the annotation namespace with the
+AnnotationRegistry so the Doctrine annotation classes can be loaded on demand.
.. code-block:: php
@@ -43,6 +44,9 @@ Doctrine classes.
$loader = new \Doctrine\Common\ClassLoader("Symfony", $couchPath . "/vendor");
$loader->register();
+ $annotationNs = 'Doctrine\\ODM\\CouchDB\\Mapping\\Annotations';
+ Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace($annotationNs, $couchPath);
+
If Doctrine Common is installed via PEAR the ClassLoader can be loaded
from the include path:
@@ -63,6 +67,9 @@ from the include path:
$loader = new \Doctrine\Common\ClassLoader("Symfony");
$loader->register();
+ $annotationNs = 'Doctrine\\ODM\\CouchDB\\Mapping\\Annotations';
+ Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace($annotationNs, $couchPath);
+
Obtaining the DocumentManager
-----------------------------

0 comments on commit c144db2

Please sign in to comment.