diff options
| author | Remi Collet <fedora@famillecollet.com> | 2014-05-13 15:32:31 +0200 | 
|---|---|---|
| committer | Remi Collet <fedora@famillecollet.com> | 2014-05-13 15:32:31 +0200 | 
| commit | d8e3eb5f3b1593e76f236149fe214746bf9e2cf9 (patch) | |
| tree | 126ee739e3ccf348e8b712cffe89985464997367 /autoload.php.in | |
| parent | 9ae2ee4c1c2e9d670802784323e2470c16e822b7 (diff) | |
php-phpunit-PHPUnit-SkeletonGenerator: 2.0.0
Diffstat (limited to 'autoload.php.in')
| -rw-r--r-- | autoload.php.in | 31 | 
1 files changed, 31 insertions, 0 deletions
| diff --git a/autoload.php.in b/autoload.php.in new file mode 100644 index 0000000..ed4d26b --- /dev/null +++ b/autoload.php.in @@ -0,0 +1,31 @@ +<?php +/* inspired from autoload from version 1.2.1 */ + +$phpdir = '/usr/share/php'; + +require_once $phpdir.'/Text/Template/Autoload.php'; + +require_once $phpdir.'/SebastianBergmann/Version/autoload.php'; + +require_once $phpdir.'/Symfony/Component/ClassLoader/UniversalClassLoader.php'; +$loader = new Symfony\Component\ClassLoader\UniversalClassLoader(); +$loader->registerNamespaces(array( +    'Symfony\\Component\\Console'         => $phpdir, +    'Symfony\\Component\\ClassLoader'     => $phpdir, +)); +$loader->register(); + +spl_autoload_register( +    function($class) { +        static $classes = null; +        if ($classes === null) { +            $classes = array( +              ___CLASSLIST___ +            ); +        } +        $cn = strtolower($class); +        if (isset($classes[$cn])) { +            require ___BASEDIR___$classes[$cn]; +        } +    } +); | 
