use of php.runtime.env.handler.EntityFetchHandler in project jphp by jphp-compiler.
the class CompileScope method findUserFunction.
public FunctionEntity findUserFunction(String name) {
String originName = name;
name = name.toLowerCase();
FunctionEntity entity = functionMap.get(name);
if (entity == null && functionEntityFetchHandler != null) {
for (EntityFetchHandler handler : functionEntityFetchHandler) {
handler.fetch(this, originName, name);
}
entity = functionMap.get(name);
}
return entity;
}
use of php.runtime.env.handler.EntityFetchHandler 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;
}
use of php.runtime.env.handler.EntityFetchHandler in project jphp by jphp-compiler.
the class CompileScope method findUserConstant.
public ConstantEntity findUserConstant(String name) {
String originName = name;
name = name.toLowerCase();
ConstantEntity entity = constantMap.get(name.toLowerCase());
if (entity == null && constantEntityFetchHandler != null) {
for (EntityFetchHandler handler : constantEntityFetchHandler) {
handler.fetch(this, originName, name);
}
entity = constantMap.get(name);
}
return entity;
}
Aggregations