Browse files

correct method name

  • Loading branch information...
1 parent d9e69bd commit 87ea8b8cfe3181dcd6294767eee5d7bfe552501c @gimler gimler committed Jun 27, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 en/reference/annotations.rst
8 en/reference/annotations.rst
@@ -73,15 +73,15 @@ To anticipate the configuration section, making the above PHP class work with Do
use Doctrine\Common\Annotations\AnnotationRegistry;
- AnnotationRegistry::registerAnnotationNamespace("Symfony\Component\Validator\Constraint", "/path/to/symfony/src");
- AnnotationRegistry::registerAnnotationNamespace("MyProject\Annotations", "/path/to/myproject/src");
+ AnnotationRegistry::registerAutoloadNamespace("Symfony\Component\Validator\Constraint", "/path/to/symfony/src");
+ AnnotationRegistry::registerAutoloadNamespace("MyProject\Annotations", "/path/to/myproject/src");
$reader = new AnnotationReader();
The second block with the annotation registry calls registers all the three different annotation namespaces that are used.
Doctrine saves all its annotations in a single file, that is why ``AnnotationRegistry#registerFile`` is used in contrast to
-``AnnotationRegistry#registerAnnotationNamespace`` which creates a PSR-0 compatible loading mechanism for class to file names.
+``AnnotationRegistry#registerAutoloadNamespace`` which creates a PSR-0 compatible loading mechanism for class to file names.
In the third block, we create the actual AnnotationReader instance. Note that we also add "dummy" to the global list of annotations
for which we do not throw exceptions. Setting this is necessary in our example case, otherwise @dummy would trigger an exception to
@@ -523,4 +523,4 @@ IDE Support
Some IDEs already provide support for annotations:
-- Eclipse via the `Symfony2 Plugin <>`_
+- Eclipse via the `Symfony2 Plugin <>`_

0 comments on commit 87ea8b8

Please sign in to comment.