本文整理了Java中php.runtime.env.Environment.doFinal()
方法的一些代码示例,展示了Environment.doFinal()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Environment.doFinal()
方法的具体详情如下:
包路径:php.runtime.env.Environment
类名称:Environment
方法名:doFinal
暂无
代码示例来源:origin: jphp-group/jphp
@Signature
public Memory __destruct(Environment env, Memory... args) throws Throwable {
environment.doFinal();
return Memory.NULL;
}
代码示例来源:origin: jphp-group/jphp
@Override
public Object eval(ScriptContext context) throws ScriptException {
try {
try {
return module.include(environment);
} catch (Exception e) {
environment.catchUncaught(e);
} catch (Throwable throwable) {
throw new RuntimeException(throwable);
} finally {
try {
environment.doFinal();
} catch (Throwable throwable) {
throw new RuntimeException(throwable);
}
}
} catch (Throwable e) {
throw new ScriptException(new Exception(e));
}
return null;
}
代码示例来源:origin: jphp-group/jphp
environment.doFinal();
} catch (Throwable throwable) {
throw new LaunchException(throwable);
代码示例来源:origin: jphp-group/jphp
@SuppressWarnings("unchecked")
protected Memory includeResource(String name, ArrayMemory globals){
ByteArrayOutputStream output = new ByteArrayOutputStream();
Environment environment;
if (isConcurrent()) {
environment = new ConcurrentEnvironment(newScope(), output);
} else {
environment = new Environment(newScope(), output);
}
File file = new File(Thread.currentThread().getContextClassLoader().getResource("resources/" + name).getFile());
Context context = new Context(file);
JvmCompiler compiler = new JvmCompiler(environment, context, getSyntax(context));
ModuleEntity module = compiler.compile();
environment.getScope().loadModule(module);
try {
environment.registerModule(module);
} catch (Throwable throwable) {
throw new RuntimeException(throwable);
}
if (globals != null)
environment.getGlobals().putAll(globals);
Memory memory = module.includeNoThrow(environment, environment.getGlobals());
try {
environment.doFinal();
} catch (Throwable throwable) {
throw new RuntimeException(throwable);
}
lastOutput = output.toString();
return memory;
}
代码示例来源:origin: jphp-group/jphp
environment.doFinal();
} catch (ErrorException e){
if (withErrors) {
内容来源于网络,如有侵权,请联系作者删除!