updated Load exclude path to use PATH constant before dir path

This commit is contained in:
Anton Grebnev
2012-06-04 18:01:10 +04:00
parent 0f1acaa7d6
commit ed015b23d0

View File

@ -16,7 +16,7 @@ class Load
static protected $autoload; static protected $autoload;
static protected $exclude = array('/.git', '/lib/core/tests', '/lib/core/.git'); static protected $exclude = array();
/** /**
* Add exclude path for autoload. Should be called before setAutoloadFrom * Add exclude path for autoload. Should be called before setAutoloadFrom
@ -71,9 +71,11 @@ class Load
} }
$scan = array(PATH . '/' . APP . '/src', PATH . '/lib'); $scan = array(PATH . '/' . APP . '/src', PATH . '/lib');
$exclude = array_merge(self::$exclude, array(PATH . '/.git', PATH . '/lib/core/tests', PATH . '/lib/core/.git'));
require_once(PATH . '/lib/core/util/AutoloadBuilder.php'); require_once(PATH . '/lib/core/util/AutoloadBuilder.php');
$builder = new AutoloadBuilder(self::$file, $scan, self::$exclude); $builder = new AutoloadBuilder(self::$file, $scan, $exclude);
$builder->build(); $builder->build();
ignore_user_abort(false); ignore_user_abort(false);
} }