public function loadExternalClass($className, $location)
{
$filePath = $location . DIRECTORY_SEPARATOR . strtolower(str_replace('\\', DIRECTORY_SEPARATOR, $className)) . '.zep';
/**
* Fix the class name
*/
$className = join('\\', array_map(function ($i) {
return ucfirst($i);
}, explode('\\', $className)));
if (isset($this->files[$className])) {
return true;
}
if (!file_exists($filePath)) {
return false;
}
$this->files[$className] = new CompilerFile($className, $filePath, $this->config, $this->logger);
$this->files[$className]->setIsExternal(true);
$this->files[$className]->preCompile($this);
$this->definitions[$className] = $this->files[$className]->getClassDefinition();
return true;
}