File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11.. index ::
22 pair: Autoloader; Configuration
33
4- How to autoload Classes
5- =======================
4+ The ClassLoader Component
5+ =========================
6+
7+ The Symfony2 ClassLoader Component loads your project classes
8+ automatically if they follow some standard PHP conventions.
69
710Whenever you use an undefined class, PHP uses the autoloading mechanism to
811delegate the loading of a file defining the class. Symfony2 provides a
9- "universal" autoloader, which is able to load classes from files that implement
10- one of the following conventions:
12+ "universal" autoloader, which is able to load classes from files that
13+ implement one of the following conventions:
1114
1215* The technical interoperability `standards `_ for PHP 5.3 namespaces and class
1316 names;
2124Usage
2225-----
2326
27+ .. versionadded :: 2.1
28+ The ``useIncludePath `` method was added in Symfony 2.1.
29+
2430Registering the :class: `Symfony\\ Component\\ ClassLoader\\ UniversalClassLoader `
2531autoloader is straightforward::
2632
@@ -29,6 +35,10 @@ autoloader is straightforward::
2935 use Symfony\Component\ClassLoader\UniversalClassLoader;
3036
3137 $loader = new UniversalClassLoader();
38+
39+ // You can search the include_path as a last resort.
40+ $loader->useIncludePath(true);
41+
3242 $loader->register();
3343
3444For minor performance gains class paths can be cached in memory using APC by
Original file line number Diff line number Diff line change 11.. index ::
22 single: Console; CLI
33
4+ The Symfony2 Console Component
5+ ==============================
46
5- How to create Console/Command-Line Commands
6- ===========================================
7+ The Symfony2 Console component eases the creation of beautiful and
8+ testable command line interfaces.
79
810Symfony2 ships with a Console component, which allows you to create
911command-line commands. Your console commands can be used for any recurring
Original file line number Diff line number Diff line change 11.. index ::
22 single: Finder
33
4- How to locate Files
5- ===================
4+ The Symfony2 Finder Component
5+ =============================
66
7- The :namespace: ` Symfony \\ Component \\ Finder` component helps you to find files
8- and directories quickly and easily .
7+ The Symfony2 Finder Component finds files and directories via an intuitive
8+ fluent interface .
99
1010Usage
1111-----
Original file line number Diff line number Diff line change 1+ The Symfony2 Components
2+ =======================
3+
4+ .. toctree ::
5+ :maxdepth: 1
6+
7+ class_loader
8+ console
9+ finder
10+ yaml
You can’t perform that action at this time.
0 commit comments