fix calendar css, take 2. (#213)
[openemr.git] / interface / modules / zend_modules / init_autoloader.php
blob5f4879ce811afaf6f3ff34aa3e9a201c6f3a93e7
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 /**
11 * This autoloading setup is really more complicated than it needs to be for most
12 * applications. The added complexity is simply to reduce the time it takes for
13 * new developers to be productive with a fresh skeleton. It allows autoloading
14 * to be correctly configured, regardless of the installation method and keeps
15 * the use of composer completely optional. This setup should work fine for
16 * most users, however, feel free to configure autoloading however you'd like.
19 // Composer autoloading
20 if (file_exists('vendor/autoload.php')) {
21 $loader = include 'vendor/autoload.php';
24 $zf2Path = false;
26 /**
27 * ZF2 Library Path Settings
28 * Please specify the directory path of the custom zf2 library need to be used
29 * otherwise it will take the library from the environment variable if available
31 if (is_dir('library')) { // Checking if custom zf2 library path exist
32 $zf2Path = 'library'; // set $zf2path variable to custom library folder path
33 } elseif (getenv('ZF2_PATH')) { // Support for ZF2_PATH environment variable or git submodule
34 $zf2Path = getenv('ZF2_PATH');
35 } elseif (get_cfg_var('zf2_path')) { // Support for zf2_path directive value
36 $zf2Path = get_cfg_var('zf2_path');
39 if ($zf2Path) {
40 if (isset($loader)) {
41 $loader->add('Zend', $zf2Path);
42 } else {
43 include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
44 Zend\Loader\AutoloaderFactory::factory(array(
45 'Zend\Loader\StandardAutoloader' => array(
46 'autoregister_zf' => true
48 ));
52 if (!class_exists('Zend\Loader\AutoloaderFactory')) {
53 throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.');