summaryrefslogtreecommitdiffstats
path: root/php-jsonlint-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-21 11:13:19 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-21 11:13:19 +0200
commit37760249be821af2344a17cf022d44c8bc0831ba (patch)
tree3d95bb682d9e2ca7e80f181244497831bbb3c94e /php-jsonlint-autoload.php
parent0a1263af52326a52e1f866dbabf1932f9d045dd2 (diff)
php-jsonlint: fedora autoloader
Diffstat (limited to 'php-jsonlint-autoload.php')
-rw-r--r--php-jsonlint-autoload.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/php-jsonlint-autoload.php b/php-jsonlint-autoload.php
index 53f50f4..a6c272d 100644
--- a/php-jsonlint-autoload.php
+++ b/php-jsonlint-autoload.php
@@ -1,15 +1,9 @@
<?php
/* Autoloader for seld/jsonlint 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\\JsonLint\\', dirname(dirname(__DIR__)));
+\Fedora\Autoloader\Autoload::addPsr4('Seld\\JsonLint\\', __DIR__);
+