diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-10-21 11:11:50 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-10-21 11:11:50 +0200 |
commit | 075e7621b8984f1711f5c3a11d0a9087f02c1a3c (patch) | |
tree | e789575946db7f0eefc3bd0620027b060c74cee1 /cli-prompt-autoload.php | |
parent | 3d5f0a887dc4fe4d779172f92e90a81a66e6b3ed (diff) |
php-seld-cli-prompt: fedora autoloader
Diffstat (limited to 'cli-prompt-autoload.php')
-rw-r--r-- | cli-prompt-autoload.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cli-prompt-autoload.php b/cli-prompt-autoload.php index 1da2de3..31a752a 100644 --- a/cli-prompt-autoload.php +++ b/cli-prompt-autoload.php @@ -1,15 +1,9 @@ <?php /* Autoloader for seld/cli-prompt and its dependencies */ -$vendorDir = '/usr/share/php'; -// Use Symfony autoloader -if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { - if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { - require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php'; - } - - $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); - $fedoraClassLoader->register(); +if (!class_exists('Fedora\\Autoloader\\Autoload', false)) { + require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; } -$fedoraClassLoader->addPrefix('Seld\\CliPrompt\\', dirname(dirname(__DIR__))); +\Fedora\Autoloader\Autoload::addPsr4('Seld\\CliPrompt\\', __DIR__); + |