To download the Zend Framework their libraries, we need to do the following:
First
- this is to add the physical path to the library in include_path.
Second
- this is the prefix class library, if such is generally used.
Add the path to the include_path in two ways:
1. Hard-coded path to public / index.php file:
2. Set the path to the file konfigruatsionnom application / configs / application.ini
In both cases we add the path to mylib the include_path. The second method is more preferable, since on the basis of the chosen configuration (production, development, test) You can set the path to the different versions mylib.
By the way using the same technique, you can set the path to the directory and library / Zend and load configurations on the basis of different versions of Zend Framework.
And so, the second that we need to do - is to connect the autoloader and set the prefix used by the classes of the library.
I ordered the autoloader in the file public / index.php
In this case, the prefix classes in my library "My_".
Also, this same code can be assigned in class Bootstrap.php
All ZF now knows how to load classes from your library.