-- debussy007 <[email protected]> wrote
(on Monday, 17 September 2012, 10:31 AM -0700):
> But then how does the application find the library?

It grabs it from the composer autoloader -- which is invoked in the
lines above the ones you quoted below. :) 

    // Composer autoloading
    if (file_exists('vendor/autoload.php')) {
        $loader = include 'vendor/autoload.php';
    }

The lines below are for when you're NOT using composer to install ZF2.
In such a case, it tries to determine it:

 * First, from the ZF2_PATH env variable
 * Second, from a php.ini "zf2_path" variable
 * Finally, by checking to see if vendor/ZF2/library/ exists

If none of those work, we don't want to try guessing anymore, and tell
you we can't find it.

> In init_autoloader.php I have the following:
> 
> /if (getenv('ZF2_PATH')) {           // Support for ZF2_PATH environment
> variable or git submodule
>     $zf2Path = getenv('ZF2_PATH');
> } elseif (get_cfg_var('zf2_path')) { // Support for zf2_path directive value
>     $zf2Path = get_cfg_var('zf2_path');
> } *elseif (is_dir('vendor/ZF2/library')) {
>     $zf2Path = 'vendor/ZF2/library';
> }*/

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to