From 6f02d96d1c4bf1ea5bef8f205151a37981cec421 Mon Sep 17 00:00:00 2001 From: Pascal Borreli Date: Sat, 15 Sep 2012 17:50:37 +0000 Subject: [PATCH] Fixed typos --- en/reference/annotations.rst | 6 +++--- en/reference/class-loading.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/en/reference/annotations.rst b/en/reference/annotations.rst index 536f64a..82db277 100644 --- a/en/reference/annotations.rst +++ b/en/reference/annotations.rst @@ -56,7 +56,7 @@ In this snippet you can see a variety of different docblock annotations: - The fully qualified annotation @MyProject\Annotations\Foobarable. This is transformed directly into the given class name. How are these annotations loaded? From looking at the code you could guess that the ORM Mapping, Assert Validation and the fully qualified annotation can just be loaded using -the defined PHP autoloaders. This is not the case however: For error handling reasons every check for class existance inside the AnnotationReader sets the second parameter $autoload +the defined PHP autoloaders. This is not the case however: For error handling reasons every check for class existence inside the AnnotationReader sets the second parameter $autoload of ``class_exists($name, $autoload)`` to false. To work flawlessly the AnnotationReader requires silent autoloaders which many autoloaders are not. Silent autoloading is NOT part of the `PSR-0 specification `_ for autoloading. @@ -177,8 +177,8 @@ to configure annotation autoloading: - Calling ``AnnotationRegistry#registerNamespace($namespace, $dirs = null)`` to register that the given namespace contains annotations and that their base directory is located at the given $dirs or in the include path if NULL is passed. The given directories should *NOT* be the directory where classes of the namespace are in, but the base directory - of the root namespace. The AnnotationRegistry uses a namespace to directory seperator approach to resolve the correct path. -- Calling ``AnnotationRegistry#registerLoader($callabale)`` to register an autoloader callback. The callback accepts the + of the root namespace. The AnnotationRegistry uses a namespace to directory separator approach to resolve the correct path. +- Calling ``AnnotationRegistry#registerLoader($callable)`` to register an autoloader callback. The callback accepts the class as first and only parameter and has to return true if the corresponding file was found and included. .. note:: diff --git a/en/reference/class-loading.rst b/en/reference/class-loading.rst index 46eb634..bd375a4 100644 --- a/en/reference/class-loading.rst +++ b/en/reference/class-loading.rst @@ -211,7 +211,7 @@ loaders and asks each of them via ``canLoadClass``, returning early ``canLoadClass``. If this sounds like it can potentially be rather costly then because that is true but it is exactly the same thing that class\_exists(..., true) does under the hood, it triggers a -complete interation of all class/auto loaders. Checking for class +complete interaction of all class/auto loaders. Checking for class existence via invoking autoloading was never a cheap thing to do but now it is more obvious and more importantly, this check is no longer interleaved with regular class loading, which avoids having