summaryrefslogtreecommitdiffstats
path: root/php-bartlett-umlwriter-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-31 18:25:31 +0100
committerRemi Collet <fedora@famillecollet.com>2016-10-31 18:25:31 +0100
commit6d2d788d23e7c5b7410d6998c4dc2794ae7205dd (patch)
treef39baa41a378d8249a1bbadf1453f9ad525d9b14 /php-bartlett-umlwriter-autoload.php
parent1135dbc1baa63ef5338b9e71d2cc9fd769b4fe43 (diff)
php-bartlett-umlwriter: fedora autoloader
Diffstat (limited to 'php-bartlett-umlwriter-autoload.php')
-rw-r--r--php-bartlett-umlwriter-autoload.php26
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';