Library/Compiler.php
public function loadExternalClass($className, $location)
    {
        $filePath = $location.\DIRECTORY_SEPARATOR.
                    strtolower(str_replace('\\', \DIRECTORY_SEPARATOR, $className)).'.zep';

        /**
         * Fix the class name.
         */
        $className = implode('\\', array_map('ucfirst', explode('\\', $className)));

        if (isset($this->files[$className])) {
            return true;
        }

        if (!file_exists($filePath)) {
            return false;
        }

        /** @var CompilerFile|CompilerFileAnonymous $compilerFile */
        $compilerFile = $this->compilerFileFactory->create($className, $filePath);
        $compilerFile->setIsExternal(true);
        $compilerFile->preCompile($this);

        $this->files[$className] = $compilerFile;
        $this->definitions[$className] = $compilerFile->getClassDefinition();

        return true;
    }
public function loadExternalClass($className, $location)
    {
        $filePath = $location.\DIRECTORY_SEPARATOR.
                    strtolower(str_replace('\\', \DIRECTORY_SEPARATOR, $className)).'.zep';

        /**
         * Fix the class name.
         */
        $className = implode('\\', array_map('ucfirst', explode('\\', $className)));

        if (isset($this->files[$className])) {
            return true;
        }

        if (!file_exists($filePath)) {
            return false;
        }

        /** @var CompilerFile|CompilerFileAnonymous $compilerFile */
        $compilerFile = $this->compilerFileFactory->create($className, $filePath);
        $compilerFile->setIsExternal(true);
        $compilerFile->preCompile($this);

        $this->files[$className] = $compilerFile;
        $this->definitions[$className] = $compilerFile->getClassDefinition();

        return true;
    }
public function loadExternalClass ( $ className , $ location ) { $ filePath = $ location . \ DIRECTORY_SEPARATOR . strtolower ( str_replace ( '\\' , \ DIRECTORY_SEPARATOR , $ className ) ) . '.zep' ; /**
         * Fix the class name.
         */ $ className = implode ( '\\' , array_map ( 'ucfirst' , explode ( '\\' , $ className ) ) ) ; if ( isset ( $ this -> files [ $ className ] ) ) { return true ; } if ( ! file_exists ( $ filePath ) ) { return false ; } /** @var CompilerFile|CompilerFileAnonymous $compilerFile */ $ compilerFile = $ this -> compilerFileFactory -> create ( $ className , $ filePath ) ; $ compilerFile -> setIsExternal ( true ) ; $ compilerFile -> preCompile ( $ this ) ; $ this -> files [ $ className ] = $ compilerFile ; $ this -> definitions [ $ className ] = $ compilerFile -> getClassDefinition ( ) ; return true ; }
Loads a class definition in an external dependency.

@param string $className
@param string $location

@return bool

@throws CompilerException
@throws IllegalStateException
@throws ParseException
Loads a class definition in an external dependency .