]>
Commit | Line | Data |
---|---|---|
65715e5b ER |
1 | <?php |
2 | $phpDir = defined('PHP_DATADIR') && PHP_DATADIR ? PHP_DATADIR . '/php/' : '/usr/share/php/'; | |
3 | ||
4 | // Use Symfony autoloader | |
5 | if (!isset($loader) || !($loader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { | |
6 | if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { | |
7 | require_once $phpDir . '/Symfony/Component/ClassLoader/ClassLoader.php'; | |
8 | } | |
9 | ||
10 | $loader = new \Symfony\Component\ClassLoader\ClassLoader(); | |
11 | $loader->register(); | |
12 | } | |
13 | ||
14 | $baseDir = dirname(__DIR__); | |
15 | ||
16 | $loader->addPrefixes(array( | |
17 | 'Composer\\' => $baseDir, | |
b6a455ef | 18 | // Dependencies |
9b786b9e | 19 | 'Composer\\CaBundle\\' => array($phpDir), |
65715e5b ER |
20 | 'Composer\\Semver\\' => array($phpDir), |
21 | 'Composer\\Spdx\\' => array($phpDir), | |
65ac01b2 | 22 | 'Composer\\XdebugHandler\\' => array($phpDir), |
65715e5b | 23 | 'JsonSchema' => array($phpDir), |
9b786b9e | 24 | 'Psr\\Log\\' => array($phpDir), |
65715e5b ER |
25 | 'Seld\\JsonLint' => array($phpDir), |
26 | 'Seld\\PharUtils\\' => array($phpDir), | |
27 | 'Symfony\\Component\\Console\\' => array($phpDir), | |
0634d5b8 | 28 | 'Symfony\\Component\\Filesystem\\' => array($phpDir), |
65715e5b ER |
29 | 'Symfony\\Component\\Finder' => array($phpDir), |
30 | 'Symfony\\Component\\Process\\' => array($phpDir), | |
31 | )); | |
65715e5b ER |
32 | |
33 | return $loader; |