Package com.caucho.quercus.env

Examples of com.caucho.quercus.env.QuercusClass


  @Override
  public Var evalVar(Env env)
  {
    String className = _className.evalString(env);
   
    QuercusClass qClass = env.getClass(className);
   
    StringValue varName = _varName.evalStringValue(env);
   
    return qClass.getStaticFieldVar(env, varName);
  }
View Full Code Here


  @Override
  public Value evalAssignRef(Env env, Value value)
  {
    String className = _className.evalString(env);
   
    QuercusClass qClass = env.getClass(className);
   
    StringValue varName = _varName.evalStringValue(env);
   
    return qClass.setStaticFieldRef(env, varName, value);
  }
View Full Code Here

  {
    if (isStatic())
      qThis = qClass;
   
    Value oldThis = env.setThis(qThis);
    QuercusClass oldClass = env.setCallingClass(qClass);
   
    try {
      return callImpl(env, args, false, null, null);
    } finally {
      env.setThis(oldThis);
View Full Code Here

  @Override
  public Value callMethodRef(Env env, QuercusClass qClass, Value qThis, Value []args)
  {
    Value oldThis = env.setThis(qThis);
    QuercusClass oldClass = env.setCallingClass(qClass);
   
    try {
      return callImpl(env, args, true, null, null);
    } finally {
      env.setThis(oldThis);
View Full Code Here

      // String className = _className;
      StringValue staticName = _staticName;

      Value qThis = env.getThis();
     
      QuercusClass qClass = qThis.getQuercusClass();
      String className = qClass.getName();
     
      // Var var = qClass.getStaticFieldVar(env, env.createString(staticName));
      // Var var = qClass.getStaticFieldVar(env, staticName);
      Var var = env.getStaticVar(env.createString(className + "::" + staticName));
     
View Full Code Here

   *
   * @return the expression value.
   */
  public Value eval(Env env)
  {
    QuercusClass cl = env.getCallingClass();

    if (cl == null) {
      env.error(getLocation(), L.l("no calling class found"));

      return NullValue.NULL;
    }

    Value thisValue = env.getThis();
    StringValue methodName = _nameExpr.evalStringValue(env);

    return cl.callMethod(env, thisValue, methodName, _args);
  }
View Full Code Here

   *
   * @return the expression value.
   */
  public Value evalRef(Env env)
  {
    QuercusClass cl = env.getCallingClass();

    if (cl == null) {
      env.error(getLocation(), L.l("no calling class found"));

      return NullValue.NULL;
    }

    // qa/0954 - what appears to be a static call may be a call to a super constructor
    Value thisValue = env.getThis();
    StringValue methodName = _nameExpr.evalStringValue(env);

    return cl.callMethodRef(env, thisValue, methodName, _args);
  }
View Full Code Here

   *
   * @return the expression value.
   */
  public Value eval(Env env)
  {
    QuercusClass cl = env.findClass(_className);

    if (cl == null) {
      env.error(getLocation(), L.l("no matching class {0}", _className));
    }

    Value thisValue = env.getThis();
    StringValue methodName = _nameExpr.evalStringValue(env);

    return cl.callMethod(env, thisValue, methodName, _args);
  }
View Full Code Here

   *
   * @return the expression value.
   */
  public Value evalRef(Env env)
  {
    QuercusClass cl = env.findClass(_className);

    if (cl == null) {
      env.error(getLocation(), L.l("no matching class {0}", _className));
    }

    // qa/0954 - what appears to be a static call may be a call to a super constructor
    Value thisValue = env.getThis();
    StringValue methodName = _nameExpr.evalStringValue(env);

    return cl.callMethodRef(env, thisValue, methodName, _args);
  }
View Full Code Here

      return BooleanValue.FALSE;
   
    if (className == null || className.length() == 0)
      className = "SimpleXMLElement";
   
    QuercusClass cls = env.getClass(className);

    return SimpleXMLElement.create(env, cls,
                                   data, options, false,
                                   namespaceV, isPrefix);
  }
View Full Code Here

TOP

Related Classes of com.caucho.quercus.env.QuercusClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.