diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-04-15 14:06:33 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-04-15 14:06:33 +0200 |
commit | 3e9b2274d543bdd1a385e91df9635691324c507a (patch) | |
tree | ac2a7d8c3b29d9515954fcb394b570217a502e16 /php-nikic-php-parser-autoload.php |
php-nikic-php-parser: 2.0.1 (new package)
Diffstat (limited to 'php-nikic-php-parser-autoload.php')
-rw-r--r-- | php-nikic-php-parser-autoload.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/php-nikic-php-parser-autoload.php b/php-nikic-php-parser-autoload.php new file mode 100644 index 0000000..61dca27 --- /dev/null +++ b/php-nikic-php-parser-autoload.php @@ -0,0 +1,19 @@ +<?php +/** + * Autoloader for nikic/php-parser 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); +} + +$fedoraPsr4ClassLoader->addPrefix('PhpParser\\', __DIR__); + |