diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-10-21 11:09:10 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-10-21 11:09:10 +0200 |
commit | 9e850c26ed992801f06b0726f53afaba55534387 (patch) | |
tree | 78eb8cda2d268d4bdd9894f8f761f534d6347110 /php-justinrainbow-json-schema-autoload.php | |
parent | 29527f6a62274a5c9602df1e0e13bf6248c11601 (diff) |
php-justinrainbow-json-schema; fedira-loader
Diffstat (limited to 'php-justinrainbow-json-schema-autoload.php')
-rw-r--r-- | php-justinrainbow-json-schema-autoload.php | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/php-justinrainbow-json-schema-autoload.php b/php-justinrainbow-json-schema-autoload.php index 24540d8..b2dca24 100644 --- a/php-justinrainbow-json-schema-autoload.php +++ b/php-justinrainbow-json-schema-autoload.php @@ -3,17 +3,9 @@ * Autoloader for justinrainbow/json-schema and its dependencies */ -$vendorDir = '/usr/share/php'; - -// Use Symfony PSR4 autoloader -if (!isset($fedoraPsr4ClassLoader) || !($fedoraPsr4ClassLoader instanceof \Symfony\Component\ClassLoader\Psr4ClassLoader)) { - if (!class_exists('Symfony\\Component\\ClassLoader\\Psr4ClassLoader', false)) { - require_once '/usr/share/php/Symfony/Component/ClassLoader/Psr4ClassLoader.php'; - } - - $fedoraPsr4ClassLoader = new \Symfony\Component\ClassLoader\Psr4ClassLoader(); - $fedoraPsr4ClassLoader->register(true); +if (!class_exists('Fedora\\Autoloader\\Autoload', false)) { + require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; } -$fedoraPsr4ClassLoader->addPrefix('JsonSchema\\', __DIR__); +\Fedora\Autoloader\Autoload::addPsr4('JsonSchema\\', __DIR__); |