Permalink
Browse files

Added the annotation namespace registration with the AnnotationRegist…

…ry to the autoloader code blocks.
  • Loading branch information...
1 parent 3e272b5 commit 27697d11f92516712b5a354c3ae96811b8290b74 @marnusw marnusw committed Mar 21, 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 of 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 27697d1

Please sign in to comment.