private function __construct($project_path)
{
- $dir = $project_path . '/vendor/composer/';
-
- $includePaths = require $project_path . '/vendor/composer/include_paths.php';
- array_push($includePaths, get_include_path());
- set_include_path(join(PATH_SEPARATOR, $includePaths));
+ $includePathsFile = $project_path . '/vendor/composer/include_paths.php';
+ if (is_file($includePathsFile)) {
+ $includePaths = require $includePathsFile;
+ array_push($includePaths, get_include_path());
+ set_include_path(join(PATH_SEPARATOR, $includePaths));
+ }
$this->classMap = require $project_path . '/vendor/composer/autoload_classmap.php';
public function load($class)
{
if (isset($this->classMap[$class])) {
- include $this->classMap[$class];
+ require $this->classMap[$class];
}
}
}