com.caucho.quercus.env
Class GlobalArrayValue

java.lang.Object
  extended by com.caucho.quercus.env.Value
      extended by com.caucho.quercus.env.ArrayValue
          extended by com.caucho.quercus.env.ArrayValueImpl
              extended by com.caucho.quercus.env.GlobalArrayValue
All Implemented Interfaces:
java.io.Serializable

@Module
public class GlobalArrayValue
extends ArrayValueImpl

Represents the server

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.caucho.quercus.env.ArrayValue
ArrayValue.AbstractGet, ArrayValue.Entry, ArrayValue.EntryIterator, ArrayValue.EntrySet, ArrayValue.GetKey, ArrayValue.GetValue, ArrayValue.KeyComparator, ArrayValue.KeyIterator, ArrayValue.KeySet, ArrayValue.ValueCollection, ArrayValue.ValueComparator, ArrayValue.ValueIterator
 
Field Summary
 
Fields inherited from class com.caucho.quercus.env.ArrayValue
ARRAY, GET_KEY, GET_VALUE
 
Fields inherited from class com.caucho.quercus.env.Value
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V
 
Constructor Summary
GlobalArrayValue(Env env)
           
 
Method Summary
 ArrayValue append(Value key, Value value)
          Adds a new value.
 void clear()
          Clears the array
 Value containsKey(Value key)
          Gets a new value.
 Value copy()
          Copy for assignment.
 java.util.Set<java.util.Map.Entry<Value,Value>> entrySet()
          Returns an iterator of the entries.
 Value get(Value key)
          Gets a new value.
 Value getArg(Value index, boolean isTop)
          Returns the value as an argument which may be a reference.
 Value getArray(Value index)
          Returns the value as an array.
 java.util.Iterator<java.util.Map.Entry<Value,Value>> getIterator(Env env)
          Returns an iterator for the key => value pairs.
 java.util.Iterator<Value> getKeyIterator(Env env)
          Returns an iterator for the field keys.
 Value getKeys()
          Returns the array keys.
 int getSize()
          Returns the size.
 java.util.Iterator<Value> getValueIterator(Env env)
          Returns an iterator for the field values.
 Var getVar(Value key)
          Returns the array ref.
 boolean isset(Value key)
          Returns true if the index isset().
 boolean keyExists(Value key)
          Returns true if the key exists in the array.
 void print(Env env)
          Prints the value.
 Value remove(Value key)
          Unsets a value.
 boolean toBoolean()
          Converts to a boolean.
 java.lang.Object toObject()
          Converts to an object.
 
Methods inherited from class com.caucho.quercus.env.ArrayValueImpl
contains, containsStrict, copy, copyFrom, copyReturn, copySaveFunArg, copyTree, createTailKey, generate, getDirty, getEntries, getHashMask, getHead, getNextAvailableIndex, getObject, getRaw, getRef, getTail, getType, getValues, isArray, pop, put, putVar, shuffle, size, slice, splice, toLocalRef, toLocalValue, toRefValue, toString, unshift
 
Methods inherited from class com.caucho.quercus.env.ArrayValue
add, append, callCallback, callCallback, callCallback, cmp, current, each, end, eq, eql, geq, getBaseIterator, getCount, getCountRecursive, getCurrent, getIterator, getKeyArray, getValueArray, getValueType, gt, hasCurrent, isCallable, isEmpty, jsonEncode, key, keyReset, keySet, keysToArray, leq, lt, next, prev, printREntry, printRImpl, put, put, put, put, put, put, put, put, put, put, put, put, putAll, reset, serialize, setCurrent, sort, toArray, toArray, toArrayValue, toAutoArray, toBinaryValueMarshalCost, toCallable, toCharMarshalCost, toDouble, toEntryArray, toJavaCollection, toJavaList, toJavaMap, toJavaObject, toKey, toLong, toObject, toString, toStringMarshalCost, toStringValueMarshalCost, toUnicodeValueMarshalCost, values, valuesToArray, valuesToArray, varDumpEntry, varDumpImpl, varExport
 
Methods inherited from class com.caucho.quercus.env.Value
abs, add, addOne, appendTo, appendTo, appendTo, appendTo, bitAnd, bitOr, bitXor, call, call, call, call, call, call, call, callCopy, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callRef, callRef, callRef, callRef, callRef, callRef, callRef, charValueAt, checkPrivate, checkProtected, clone, copy, copyArrayItem, copyStringBuilder, div, div, eqValue, findFunction, getArray, getCallableName, getCalledClass, getClassName, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getHashCode, getObject, getQuercusClass, getResourceType, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, hashCode, increment, initField, isA, isA, isBinary, isBoolean, isDefault, isDouble, isDoubleConvertible, isFieldInit, isLong, isLongConvertible, isNull, isNumberConvertible, isNumeric, isObject, isResource, isset, issetField, issetThisField, isString, isUnicode, isVar, length, lshift, mod, mul, mul, neg, nextIndex, pos, postdecr, postincr, postincr, predecr, preincr, preincr, print, printDepth, printJavaChar, printJavaString, printR, put, putField, putField, putField, putObject, putThisField, putThisField, rshift, serialize, set, setCharValueAt, setFieldInit, setJavaObject, sub_rev, sub, sub, subOne, toArgRef, toAutoObject, toBigDecimal, toBigInteger, toBinaryValue, toBinaryValue, toBinaryValue, toBooleanMarshalCost, toByteArrayMarshalCost, toByteMarshalCost, toChar, toCharArrayMarshalCost, toDebugString, toDoubleMarshalCost, toDoubleValue, toException, toFloatMarshalCost, toInputStream, toInt, toIntegerMarshalCost, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaDate, toJavaDouble, toJavaFloat, toJavaInteger, toJavaLong, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toLocalThis, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, toLongMarshalCost, toLongValue, toRef, toShortMarshalCost, toStringBuilder, toStringBuilder, toStringBuilder, toStringBuilder, toStringValue, toStringValue, toUnicode, toUnicodeValue, toUnicodeValue, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, varDump
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GlobalArrayValue

public GlobalArrayValue(Env env)
Method Detail

toObject

public java.lang.Object toObject()
Converts to an object.

Overrides:
toObject in class ArrayValueImpl

toBoolean

public boolean toBoolean()
Description copied from class: ArrayValueImpl
Converts to a boolean.

Overrides:
toBoolean in class ArrayValueImpl

append

public ArrayValue append(Value key,
                         Value value)
Adds a new value.

Overrides:
append in class ArrayValueImpl

get

public Value get(Value key)
Gets a new value.

Overrides:
get in class ArrayValueImpl

getVar

public Var getVar(Value key)
Returns the array ref.

Overrides:
getVar in class ArrayValueImpl

getArg

public Value getArg(Value index,
                    boolean isTop)
Returns the value as an argument which may be a reference.

Overrides:
getArg in class ArrayValueImpl

getArray

public Value getArray(Value index)
Returns the value as an array.

Overrides:
getArray in class ArrayValueImpl

remove

public Value remove(Value key)
Unsets a value.

Overrides:
remove in class ArrayValueImpl

clear

public void clear()
Description copied from class: ArrayValueImpl
Clears the array

Overrides:
clear in class ArrayValueImpl

copy

public Value copy()
Copy for assignment.

Overrides:
copy in class ArrayValueImpl

getSize

public int getSize()
Description copied from class: ArrayValueImpl
Returns the size.

Overrides:
getSize in class ArrayValueImpl

containsKey

public Value containsKey(Value key)
Gets a new value.

Overrides:
containsKey in class ArrayValueImpl
Parameters:
key - to search for in the array
Returns:
the value if it is found in the array, NULL otherwise

isset

public boolean isset(Value key)
Returns true if the index isset().

Overrides:
isset in class ArrayValue

keyExists

public boolean keyExists(Value key)
Returns true if the key exists in the array.

Overrides:
keyExists in class ArrayValue

print

public void print(Env env)
Prints the value.

Overrides:
print in class ArrayValue
Parameters:
env -

getKeys

public Value getKeys()
Returns the array keys.

Overrides:
getKeys in class ArrayValueImpl

entrySet

public java.util.Set<java.util.Map.Entry<Value,Value>> entrySet()
Returns an iterator of the entries.

Overrides:
entrySet in class ArrayValue

getIterator

public java.util.Iterator<java.util.Map.Entry<Value,Value>> getIterator(Env env)
Description copied from class: Value
Returns an iterator for the key => value pairs.

Overrides:
getIterator in class Value

getKeyIterator

public java.util.Iterator<Value> getKeyIterator(Env env)
Description copied from class: Value
Returns an iterator for the field keys. The default implementation uses the Iterator returned by Value.getIterator(Env); derived classes may override and provide a more efficient implementation.

Overrides:
getKeyIterator in class ArrayValue

getValueIterator

public java.util.Iterator<Value> getValueIterator(Env env)
Description copied from class: Value
Returns an iterator for the field values. The default implementation uses the Iterator returned by Value.getIterator(Env); derived classes may override and provide a more efficient implementation.

Overrides:
getValueIterator in class ArrayValue