Make autoloader for new names PSR-0 compliant

This commit is contained in:
Nikita Popov 2014-04-02 09:44:45 +02:00
parent c62ffedfca
commit c341ab2ecf
50 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Autoloader
*/
static public function autoload($class) {
if (0 === strpos($class, 'PhpParser\\')) {
$fileName = dirname(__DIR__) . '/' . rtrim(strtr($class, '\\', '/'), '_') . '.php';
$fileName = dirname(__DIR__) . '/' . strtr($class, '\\', '/') . '.php';
if (file_exists($fileName)) {
require $fileName;
}