Package com.caucho.quercus.env

Examples of com.caucho.quercus.env.QuercusClass$StaticField


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

    if (cl == null)
      throw env.createErrorException(L.l("{0} is an unknown class", _className));

    AbstractFunction fun = cl.getFunction(_name);
   
    Value []values = evalArgs(env, _args);

    Value qThis = env.getThis();
    env.pushCall(this, qThis, values);

    try {
      env.checkTimeout();

      return cl.callMethod(env, qThis, _name, _name.hashCode(), values);
    } finally {
      env.popCall();
    }
  }
View Full Code Here


  @Override
  public Value eval(Env env)
  {
    Value qThis = env.getThis();
   
    QuercusClass cls = qThis.getQuercusClass();

    if (cls == null) {
      env.error(getLocation(), L.l("no calling class found"));
     
      return NullValue.NULL;
    }
   
    StringValue methodName = _methodName.evalStringValue(env);
    int hash = methodName.hashCodeCaseInsensitive();
   
    Value []values = evalArgs(env, _args);

    env.pushCall(this, cls, values);

    try {
      env.checkTimeout();

      return cls.callMethod(env, qThis, methodName, hash, values);
    } finally {
      env.popCall();
    }
  }
View Full Code Here

   * @return the expression value.
   */
  public Value eval(Env env)
  {
    String name = _name.evalString(env).intern();
    QuercusClass cl = env.findAbstractClass(name);

    _fullArgs = _args;

    Value []args = new Value[_args.length];

    for (int i = 0; i < args.length; i++) {
      args[i] = _args[i].eval(env);
    }

    env.pushCall(this, NullValue.NULL, args);
   
    try {
      env.checkTimeout();

      return cl.callNew(env, args);
    } finally {
      env.popCall();
    }
  }
View Full Code Here

  @Override
  public Value eval(Env env)
  {
    String className = _className.evalString(env);
   
    QuercusClass cl = env.findClass(className);

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

    return cl.callMethod(env, env.getThis(),
                         _methodName, hash,
                         evalArgs(env, _args));
  }
View Full Code Here

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

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

    // qa/0954 - static calls pass the current $this
    Value qThis = env.getThis();
   
    StringValue methodName = _nameExpr.evalStringValue(env);
   
    Value []args = evalArgs(env, _args);
    int hash = methodName.hashCodeCaseInsensitive();

    return cl.callMethod(env, qThis, methodName, hash, args);
  }
View Full Code Here

   */
  public Value eval(Env env)
  {
    Value qThis = env.getThis();
   
    QuercusClass cls = qThis.getQuercusClass();

    if (cls == null) {
      env.error(getLocation(), L.l("no calling class found"));
     
      return NullValue.NULL;
    }
   
    Value []values = evalArgs(env, _args);

    env.pushCall(this, cls, values);

    try {
      env.checkTimeout();

      return cls.callMethod(env, qThis, _methodName, _hash, values);
    } finally {
      env.popCall();
    }
  }
View Full Code Here

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

    if (cl == null)
      throw env.createErrorException(L.l("{0} is an unknown class", _className));

    Value []values = evalArgs(env, _args);

    Value oldThis = env.getThis();
   
    // php/09qe
    Value qThis = oldThis;
    /*
    if (oldThis.isNull()) {
      qThis = cl;
      env.setThis(qThis);
    }
    else
      qThis = oldThis;
      */
    // php/024b
    // qThis = cl;
   
    env.pushCall(this, cl, values);
    // QuercusClass oldClass = env.setCallingClass(cl);

    try {
      env.checkTimeout();
     
      return cl.callMethod(env, qThis, _methodName, _hash, values);
    } finally {
      env.popCall();
      env.setThis(oldThis);
      // env.setCallingClass(oldClass);
    }
View Full Code Here

  @Override
  public Value eval(Env env)
  {
    String className = _className.evalString(env);

    QuercusClass qClass = env.getClass(className);
   
    return qClass.getStaticFieldValue(env, _varName);
  }
View Full Code Here

  @Override
  public Var evalVar(Env env)
  {
    String className = _className.evalString(env);

    QuercusClass qClass = env.getClass(className);
   
    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);
   
    return qClass.setStaticFieldRef(env, _varName, value);
  }
View Full Code Here

TOP

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

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.