Package com.caucho.quercus.env

Examples of com.caucho.quercus.env.Value


   * Evaluates the expression as an isset().
   */
  @Override
  public boolean evalIsset(Env env)
  {
    Value array = _expr.eval(env);
    Value index = _index.eval(env);
   
    return array.isset(index);
  }
View Full Code Here


   * @return the expression value.
   */
  @Override
  public void evalUnset(Env env)
  {
    Value index = _index.eval(env);
    _expr.evalUnsetArray(env, index);
  }
View Full Code Here

      env.setScriptContext(cxt);

      // php/214g
      env.start();

      Value resultV = _program.execute(env);

      Object result = null;
      if (resultV != null)
        result = resultV.toJavaObject();

      out.flushBuffer();
      out.free();
      writer.flush();
      return result;
View Full Code Here

      env.start();

      Object result = null;

      try {
        Value value = program.execute(env);

        if (value != null)
          result = value.toJavaObject();
      } catch (QuercusExitException e) {
        e.printStackTrace();
      }

      out.flushBuffer();
View Full Code Here

    // Environment.addDependency(new Depend(path));

    if (path.canRead()) {
      Env env = new Env(this);

      Value result = FileModule.parse_ini_file(env, path, false);

      if (result instanceof ArrayValue) {
        ArrayValue array = (ArrayValue) result;

        for (Map.Entry<Value,Value> entry : array.entrySet()) {
View Full Code Here

  public Value execute(Env env)
  {
    try {
      return _block.execute(env);
    } catch (QuercusLanguageException e) {
      Value value = e.getValue();

      for (int i = 0; i < _catchList.size(); i++) {
        Catch item = _catchList.get(i);
       
        if (value != null && value.isA(item.getId()) ||
            item.getId().equals("Exception")) {
          if (value != null)
            item.getExpr().evalAssign(env, value);
          else
            item.getExpr().evalAssign(env, NullValue.NULL);
View Full Code Here

        _init.eval(env);

      while (_test == null || _test.evalBoolean(env)) {
        env.checkTimeout();

        Value value = _block.execute(env);

        if (value == null) {
        }
        else if (value instanceof ContinueValue) {
          ContinueValue conValue = (ContinueValue) value;
View Full Code Here

    _expr = expr;
  }
 
  public Value execute(Env env)
  {
    Value value = _expr.eval(env);

    value.print(env);

    return null;
  }
View Full Code Here

     
    zone.put("offset", offset);
    zone.put("timezone_id", tz.getID());
   
    String name = tz.getDisplayName(isDST, TimeZone.SHORT);
    Value nameV = StringValue.create(name.toLowerCase());
   
    Value zones = array.get(nameV);
   
    if (zones.isNull()) {
      zones = new ArrayValueImpl();
     
      array.put(nameV, zones);
    }
   
    zones.put(zone);
  }
View Full Code Here

    // Can't use TimeZone.getTimeZone() because that function returns
    // GMT timezone by default if not found
   
    ArrayValue array = listAbbreviations();
   
    Value zones = array.get(abbr.toLowerCase());

    if (zones.isset())
      return zones.get(LongValue.ZERO).get(StringValue.create("timezone_id"));
    else
      return BooleanValue.FALSE;
  }
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.