From: YonmaN Date: Mon, 3 Sep 2012 11:57:15 +0000 (+0300) Subject: Update init_autoloader.php X-Git-Url: http://git.inspyration.org/?p=zf2.biz%2Fapplication_blanche.git;a=commitdiff_plain;h=36f90f983b2e4aba259b9718517a45ca8f5b2e08 Update init_autoloader.php Found it handy to allow an application to have the zf2 path specified through the php.ini file or some other ini in scandir. These can be also cascaded and managed centrally which is also nice when you can't specify an environment variable. --- diff --git a/init_autoloader.php b/init_autoloader.php index d9f6042..5552eea 100644 --- a/init_autoloader.php +++ b/init_autoloader.php @@ -22,7 +22,10 @@ if (file_exists('vendor/autoload.php')) { } // Support for ZF2_PATH environment variable or git submodule -if (($zf2Path = getenv('ZF2_PATH') ?: (is_dir('vendor/ZF2/library') ? 'vendor/ZF2/library' : false)) !== false) { +if (($zf2Path = getenv('ZF2_PATH') ?: + // Support for zf2_path ini directive + (get_cfg_var('zf2_path') ?: + (is_dir('vendor/ZF2/library') ? 'vendor/ZF2/library' : false)) !== false)) { if (isset($loader)) { $loader->add('Zend', $zf2Path . '/Zend'); } else {