diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-07-02 10:26:30 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-07-02 10:26:30 +0200 |
commit | 7113f13a659c56a2dc66219131795123ef517e4a (patch) | |
tree | ce99c728bff7b677ba6d0544f048029cb918003b /php-phpmd-PHP-PMD-autoload.php | |
parent | c8995562e0a6c31143dcbf54d74cdfcd41cd8b9c (diff) |
php-pdepend-PHP-Depend: 2.2.3
Diffstat (limited to 'php-phpmd-PHP-PMD-autoload.php')
-rw-r--r-- | php-phpmd-PHP-PMD-autoload.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/php-phpmd-PHP-PMD-autoload.php b/php-phpmd-PHP-PMD-autoload.php new file mode 100644 index 0000000..0d8d87e --- /dev/null +++ b/php-phpmd-PHP-PMD-autoload.php @@ -0,0 +1,22 @@ +<?php +/* Autoloader for pdepend/pdepend 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(); +} + +/* PHPMD */ +$fedoraClassLoader->addPrefix('PHPMD\\', dirname(__DIR__)); + +/* for symfony/dependency-injection, filesystem and config */ +$fedoraClassLoader->addPrefix('Symfony\\Component\\', $vendorDir); + +/* PDepend */ +require_once $vendorDir . '/PDepend/autoload.php'; |