From 36f90f983b2e4aba259b9718517a45ca8f5b2e08 Mon Sep 17 00:00:00 2001 From: YonmaN Date: Mon, 3 Sep 2012 14:57:15 +0300 Subject: [PATCH] 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. --- init_autoloader.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 { -- 1.7.10.4