4
4
The Class Loader Component
5
5
==========================
6
6
7
- The Class Loader Component provides tools to load and cache your project
8
- classes automatically .
7
+ The Class Loader Component provides tools to autoload your classes and
8
+ cache their locations for performance .
9
9
10
10
Usage
11
11
-----
12
12
13
- Whenever you use an undefined class, PHP uses the autoloading mechanism to
14
- delegate the loading of a file defining the class. Symfony2 provides two
15
- autoloaders, which are able to load your classes:
13
+ Whenever you reference a class that has not been required or included yet,
14
+ PHP uses the ` autoloading mechanism `_ to delegate the loading of a file defining
15
+ the class. Symfony2 provides two autoloaders, which are able to load your classes:
16
16
17
- * :doc: `A PSR-0 class loader </components/class_loader/class_loader >`
18
- * :doc: `Load classes based on class-to-file mapping </components/class_loader/map_class_loader >`
17
+ * :doc: `/components/class_loader/class_loader `: loads classes that follow
18
+ the `PSR-0 ` class naming standard;
19
+
20
+ * :doc: `/components/class_loader/map_class_loader `: loads classes using
21
+ a static map from class name to file path.
19
22
20
23
Additionally, the Symfony Class Loader Component ships with a set of wrapper
21
24
classes which can be used to add additional functionality on top of existing
@@ -33,4 +36,5 @@ You can install the component in 2 different ways:
33
36
* :doc: `Install it via Composer </components/using_components >` (``symfony/class-loader ``
34
37
on `Packagist `_).
35
38
39
+ .. _`autoloading mechanism` : http://php.net/manual/en/language.oop5.autoload.php
36
40
.. _Packagist : https://packagist.org/packages/symfony/class-loader
0 commit comments