Search in sources :

Example 6 with CompileScope

use of php.runtime.env.CompileScope in project jphp by jphp-compiler.

the class EvalCommand method getValue.

public static Memory getValue(Debugger context, String value) {
    DebugTick tick = context.getRegisteredTick();
    Environment environment = new Environment(new CompileScope(tick.getEnvironment().getScope()));
    try {
        return EvalFunctions.eval(environment, tick.getTrace(), tick.getLocals(), "return " + value + ";");
    } catch (Throwable throwable) {
        return null;
    }
}
Also used : DebugTick(org.develnext.jphp.debug.impl.DebugTick) CompileScope(php.runtime.env.CompileScope) Environment(php.runtime.env.Environment)

Example 7 with CompileScope

use of php.runtime.env.CompileScope in project jphp by jphp-compiler.

the class JsonJvmTestCase method newScope.

@Override
protected CompileScope newScope() {
    CompileScope scope = super.newScope();
    scope.registerExtension(new JsonExtension());
    return scope;
}
Also used : CompileScope(php.runtime.env.CompileScope)

Example 8 with CompileScope

use of php.runtime.env.CompileScope in project jphp by jphp-compiler.

the class JsoupJvmTestCase method newScope.

@Override
protected CompileScope newScope() {
    CompileScope scope = super.newScope();
    scope.registerExtension(new JsoupExtension());
    return scope;
}
Also used : CompileScope(php.runtime.env.CompileScope) JsoupExtension(org.develnext.jphp.ext.jsoup.JsoupExtension)

Example 9 with CompileScope

use of php.runtime.env.CompileScope in project jphp by jphp-compiler.

the class JsonFunctionsTest method newScope.

@Override
protected CompileScope newScope() {
    CompileScope scope = super.newScope();
    scope.registerExtension(new JsonExtension());
    return scope;
}
Also used : CompileScope(php.runtime.env.CompileScope)

Example 10 with CompileScope

use of php.runtime.env.CompileScope in project jphp by jphp-compiler.

the class WebserverJvmTestCase method newScope.

@Override
protected CompileScope newScope() {
    CompileScope scope = super.newScope();
    scope.registerExtension(new WebServerExtension());
    scope.setLangMode(LangMode.MODERN);
    return scope;
}
Also used : CompileScope(php.runtime.env.CompileScope) WebServerExtension(org.develnext.jphp.ext.webserver.WebServerExtension)

Aggregations

CompileScope (php.runtime.env.CompileScope)11 ZendExtension (org.develnext.jphp.zend.ext.ZendExtension)3 Environment (php.runtime.env.Environment)3 IOException (java.io.IOException)1 DebugTick (org.develnext.jphp.debug.impl.DebugTick)1 Debugger (org.develnext.jphp.debug.impl.Debugger)1 DebuggerException (org.develnext.jphp.debug.impl.DebuggerException)1 JsoupExtension (org.develnext.jphp.ext.jsoup.JsoupExtension)1 SqlExtension (org.develnext.jphp.ext.sql.SqlExtension)1 WebServerExtension (org.develnext.jphp.ext.webserver.WebServerExtension)1 PWebRequest (org.develnext.jphp.ext.webserver.classes.PWebRequest)1 PWebResponse (org.develnext.jphp.ext.webserver.classes.PWebResponse)1 PWebServer (org.develnext.jphp.ext.webserver.classes.PWebServer)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 SplClassLoader (php.runtime.env.SplClassLoader)1 ProgramShutdownHandler (php.runtime.env.handler.ProgramShutdownHandler)1 Invoker (php.runtime.invoke.Invoker)1