summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zend-loader-autoload.php
blob: e5b7d439538b01ad19e716e12e8ccd315b38677d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/*
Simple autoloader for Zend Framework
Inspired from https://github.com/zendframework/ZendSkeletonApplication

Set autoregister_zf     for Zend Framework
Set fallback_autoloader for dependencies which are PSR-0 compliant
*/
require_once __DIR__ . '/Loader/AutoloaderFactory.php';
Zend\Loader\AutoloaderFactory::factory(array(
    'Zend\Loader\StandardAutoloader' => array(
        'fallback_autoloader' => true,
        'autoregister_zf' => true
     )
));

// Dependencies during build
if (defined('RPM_BUILDROOT')) {
    foreach(glob(RPM_BUILDROOT . '/*-autoload.php') as $dep) {
        require_once $dep;
    }
}
// Dependencies outside Zend namespace
foreach(glob(__DIR__ . '/*-autoload.php') as $dep) {
    require_once $dep;
}