Package com.caucho.quercus.env

Examples of com.caucho.quercus.env.ArrayValue$ValueCollection


      lengthV.isArray()
      ? ((ArrayValue) lengthV).values().iterator()
      : null;

    if (subjectV.isArray()) {
      ArrayValue resultArray = new ArrayValueImpl();

      ArrayValue subjectArray = (ArrayValue) subjectV;

      for (Value value : subjectArray.values()) {

        if (lengthIterator != null && lengthIterator.hasNext())
          length = lengthIterator.next().toInt();

        if (startIterator != null && startIterator.hasNext())
View Full Code Here


      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()) {
          setIni(entry.getKey().toString(), entry.getValue().toString());
        }
      }

      _iniFile = path;
View Full Code Here

  /**
   * Returns an array of the defined functions.
   */
  public ArrayValue getDefinedFunctions()
  {
    ArrayValue internal = new ArrayValueImpl();

    for (String name : _funMap.keySet()) {
      internal.put(name);
    }

    return internal;
  }
View Full Code Here

  /**
   * Returns true if an extension is loaded.
   */
  public Value getExtensionFuncs(String name)
  {
    ArrayValue value = null;

    for (ModuleInfo moduleInfo : _modules.values()) {
      Set<String> extensionSet = moduleInfo.getLoadedExtensions();

      if (extensionSet.contains(name)) {
        for (String functionName : moduleInfo.getFunctions().keySet()) {
          if (value == null)
            value = new ArrayValueImpl();

          value.put(functionName);
        }
      }
    }

    if (value != null)
View Full Code Here

      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()) {
          setIni(entry.getKey().toString(), entry.getValue());
        }
      }

      _iniFile = path;
View Full Code Here

  /**
   * Returns an array of the defined functions.
   */
  public ArrayValue getDefinedFunctions()
  {
    ArrayValue internal = new ArrayValueImpl();

    for (String name : _funMap.keySet()) {
      internal.put(name);
    }

    return internal;
  }
View Full Code Here

  /**
   * Returns true if an extension is loaded.
   */
  public Value getExtensionFuncs(String name)
  {
    ArrayValue value = null;

    for (ModuleInfo moduleInfo : _modules.values()) {
      Set<String> extensionSet = moduleInfo.getLoadedExtensions();

      if (extensionSet.contains(name)) {
        for (String functionName : moduleInfo.getFunctions().keySet()) {
          if (value == null)
            value = new ArrayValueImpl();

          value.put(functionName);
        }
      }
    }

    if (value != null)
View Full Code Here

    return new DateTimeZone(id);
  }
 
  public static ArrayValue listAbbreviations()
  {
    ArrayValue array = new ArrayValueImpl();
   
    String []ids = TimeZone.getAvailableIDs();
   
    for (int i = 0; i < ids.length; i++) {
      TimeZone tz = TimeZone.getTimeZone(ids[i]);
View Full Code Here

    zones.put(zone);
  }
 
  public static ArrayValue listIdentifiers()
  {
    ArrayValue array = new ArrayValueImpl();
   
    String []ids = TimeZone.getAvailableIDs();
   
    java.util.Arrays.sort(ids);
   
    for (int i = 0; i < ids.length; i++) {
      array.put(ids[i]);
    }

    return array;
  }
View Full Code Here

  protected static Value findTimeZone(StringValue abbr)
  {
    // 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.ArrayValue$ValueCollection

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.