diff options
Diffstat (limited to 'php-bartlett-umlwriter-autoload.php')
-rw-r--r-- | php-bartlett-umlwriter-autoload.php | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/php-bartlett-umlwriter-autoload.php b/php-bartlett-umlwriter-autoload.php index 8581826..47041a7 100644 --- a/php-bartlett-umlwriter-autoload.php +++ b/php-bartlett-umlwriter-autoload.php @@ -3,23 +3,13 @@ * Autoloader for bartlett/umlwriter 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(); -} -$fedoraClassLoader->addPrefixes(array( - 'Symfony\\Component\\' => $vendorDir, - 'TokenReflection\\' => $vendorDir, - 'Bartlett\\UmlWriter\\' => dirname(dirname(__DIR__)), +require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; + +\Fedora\Autoloader\Autoload::addPsr4('Bartlett\\UmlWriter\\', dirname(__DIR__)); +\Fedora\Autoloader\Dependencies::required(array( + '/usr/share/php/Symfony/Component/autoload.php', + '/usr/share/php/TokenReflection/autoload.php', + '/usr/share/php/SebastianBergmann/Version/autoload.php', + '/usr/share/php/Bartlett/Reflect/autoload.php', )); -// Dependencies -require_once $vendorDir . '/SebastianBergmann/Version/autoload.php'; -require_once $vendorDir . '/Bartlett/Reflect/autoload.php'; |