Search in sources :

Example 1 with ClassWrapper

use of php.runtime.wrap.ClassWrapper in project jphp by jphp-compiler.

the class CompileScope method fetchUserClass.

public ClassEntity fetchUserClass(String name, String nameLower) {
    ClassEntity entity;
    if (classEntityFetchHandler != null) {
        for (EntityFetchHandler handler : classEntityFetchHandler) {
            handler.fetch(this, name, nameLower);
        }
    }
    entity = classMap.get(nameLower);
    if (entity != null) {
        return entity;
    }
    CompileClass compileClass = compileClassMap.get(nameLower);
    if (compileClass == null)
        return null;
    entity = new ClassEntity(new ClassWrapper(compileClass.getExtension(), this, compileClass.getNativeClass()));
    entity.setId(nextClassIndex());
    synchronized (classMap) {
        classMap.put(name, entity);
    }
    return entity;
}
Also used : CompileClass(php.runtime.ext.support.compile.CompileClass) EntityFetchHandler(php.runtime.env.handler.EntityFetchHandler) ClassWrapper(php.runtime.wrap.ClassWrapper)

Aggregations

EntityFetchHandler (php.runtime.env.handler.EntityFetchHandler)1 CompileClass (php.runtime.ext.support.compile.CompileClass)1 ClassWrapper (php.runtime.wrap.ClassWrapper)1