Created
March 30, 2012 22:09
-
-
Save tystr/2255994 to your computer and use it in GitHub Desktop.
phpunit autoload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// autloload.php.dist | |
$vendorDir = __DIR__.'/../../../../../vendor'; | |
echo realpath($vendorDir); | |
require_once $vendorDir.'/symfony/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; | |
use Symfony\Component\ClassLoader\UniversalClassLoader; | |
$loader = new UniversalClassLoader(); | |
$loader->registerNamespaces(array( | |
'Twig_Extensions_' => $vendorDir . '/twig/extensions/lib', | |
'Twig_' => $vendorDir . '/twig/twig/lib', | |
'Symfony' => array($vendorDir.'/symfony/symfony/src/', $vendorDir.'/bundles'), | |
'Doctrine\\Common' => $vendorDir.'/doctrine-common/lib', | |
'Doctrine\\ORM' => $vendorDir . '/doctrine/orm/lib/', | |
'Doctrine\\DBAL' => $vendorDir . '/doctrine/dbal/lib/', | |
'Doctrine\\Common' => $vendorDir . '/doctrine/common/lib/', | |
'Doctrine' => $vendorDir.'/doctrine/lib', | |
'MyNamespace' => __DIR__.'/../../../../' | |
)); | |
$loader->registerPrefixes(array( | |
'Twig_' => $vendorDir.'/twig/lib', | |
)); | |
$loader->register(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment