Package com.caucho.quercus.env

Examples of com.caucho.quercus.env.Value


                                      int offset,
                                      boolean isDST)
  {
    ArrayValue array = listAbbreviations();
   
    Value zones = array.get(abbr.toLowerCase());
   
    if (zones.isset() && zones.isArray()) {
      Value offsetStr = StringValue.create("offset");
     
      for (Value zone : ((ArrayValue)zones).values()) {
        if (zone.get(offsetStr).toInt() == offset)
          return zone.get(StringValue.create("timezone_id"));
      }
View Full Code Here


   * @param env the quercus environment
   * @return the resulting value
   */
  public Value eval(Env env)
  {
    Value lValue = _left.eval(env);
    Value rValue = _right.eval(env);

    return lValue.sub(rValue);
  }
View Full Code Here

      int size = _preparedMapping.size();

      for (int i = 0; i < size; i++) {
        LongValue param = _preparedMapping.get(i);

        Value paramV = getParam(param.toInt()-1);

        if (paramV.equals(UnsetValue.UNSET)) {
          env.warning(L.l("Not all parameters are bound"));
          return false;
        }

        Object object = paramV.toJavaObject();

        setObject(i+1, object);
      }

      return executeStatement();
View Full Code Here

        StringValue name
        = QuercusMimeUtility.decodeMime(env, header.getName(), charset);
        StringValue val
        = QuercusMimeUtility.decodeMime(env, header.getValue(), charset);

        Value headerName;
        if ((headerName = headers.containsKey(name)) == null) {
          headers.put(name, val);
          continue;
        }

        ArrayValue inner;
        if (headerName.isArray()) {
          inner = headerName.toArrayValue(env);
        }
        else {
          inner = new ArrayValueImpl();
          inner.put(headerName);
        }
View Full Code Here

   * @param env the calling environment.
   * @return the expression value.
   */
  public Value eval(Env env)
  {
    Value value;

    value = env.getValue(_name);

    if (value != null)
      return value;
View Full Code Here

   * @return the expression value.
   */
  @Override
  public Value evalCopy(Env env)
  {
    Value v = eval(env);
   
    return v.copy();
  }
View Full Code Here

   * @return the expression value.
   */
  @Override
  public Value evalArray(Env env)
  {
    Value value;

    /*
    if (_var.isGlobal()) {
      value = env.getGlobalValue(_name);

      if (value == null) {
        value = new ArrayValueImpl();

        env.setGlobalValue(_name, value);
      }
      else {
        Value array = value.toAutoArray();

        if (array != value) {
          env.setGlobalValue(_name, array);

          value = array;
        }
      }
    */
    //} else {
      value = env.getVar(_name);

      if (value == null) {
        value = new ArrayValueImpl();

        env.setValue(_name, value);
      }
      else {
        value = value.toAutoArray();
      }
   // }

    return value;
  }
View Full Code Here

   * @param env the calling environment.
   * @return the expression value.
   */
  public Value evalObject(Env env)
  {
    Value value;

    /*
    if (_var.isGlobal()) {
      value = env.getGlobalValue(_name);

      if (value == null || value.isString() || value.isNull()) {
        value = env.createObject();

        env.setGlobalValue(_name, value);
      }
    } else {
    */
      value = env.getValue(_name);

      if (value == null || value.isString() || value.isNull()) {
        value = env.createObject();

        env.setValue(_name, value);
      }
    //}
View Full Code Here

   *
   * @return the expression value.
   */
  public Value eval(Env env)
  {
    Value lValue = _left.eval(env);
    Value rValue = _right.eval(env);

    return lValue.rshift(rValue);
  }
View Full Code Here

   *
   * @return the expression value.
   */
  public long evalLong(Env env)
  {
    Value lValue = _left.eval(env);
    Value rValue = _right.eval(env);

    return lValue.toLong() >> rValue.toLong();
  }
View Full Code Here

TOP

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

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.