com.caucho.quercus.env
Class ArrayCopyValueImpl

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.ArrayCopyValueImpl
All Implemented Interfaces:
java.io.Serializable

public class ArrayCopyValueImpl
extends ArrayValueImpl

Represents a PHP array value copied as part of deserialization or APC. Any modification to the array will set the CopyRoot modified

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
protected ArrayCopyValueImpl(Env env, ArrayValue copy, CopyRoot root)
          Copy for unserialization.
 
Method Summary
 ArrayValue append(Value key, Value value)
          Adds a new value.
 void clear()
          Clears the array
 Value copy()
          Copy the value.
 Value copyReturn()
          Copy for return.
 Value copySaveFunArg()
          Copy for saving a method's arguments.
 Value getArg(Value index, boolean isTop)
          Returns the value as an argument which may be a reference.
 Value getDirty(Value index)
          Returns the value as an array, using copy on write if necessary.
 Var getVar(Value index)
          Returns the array ref.
 Value put(Value value)
          Add
 Value put(Value key, Value value)
          Adds a new value.
 Var putVar()
          Sets the array ref.
 Value remove(Value key)
          Removes a value.
 Value shuffle()
          Shuffles the array
 ArrayValue splice(int start, int end, ArrayValue replace)
          Replace a section of the array.
 Value toLocalRef()
          Convert to an argument value.
 ArrayValue unshift(Value value)
          Add to the beginning
 
Methods inherited from class com.caucho.quercus.env.ArrayValueImpl
contains, containsKey, containsStrict, copy, copyFrom, copyTree, createTailKey, generate, get, getArray, getEntries, getHashMask, getHead, getKeys, getNextAvailableIndex, getObject, getRaw, getRef, getSize, getTail, getType, getValues, isArray, pop, size, slice, toBoolean, toLocalValue, toObject, toRefValue, toString
 
Methods inherited from class com.caucho.quercus.env.ArrayValue
add, append, callCallback, callCallback, callCallback, cmp, current, each, end, entrySet, eq, eql, geq, getBaseIterator, getCount, getCountRecursive, getCurrent, getIterator, getKeyArray, getKeyIterator, getValueArray, getValueIterator, getValueType, gt, hasCurrent, isCallable, isEmpty, isset, jsonEncode, key, keyExists, keyReset, keySet, keysToArray, leq, lt, next, prev, print, printREntry, printRImpl, 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, getIterator, 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

ArrayCopyValueImpl

protected ArrayCopyValueImpl(Env env,
                             ArrayValue copy,
                             CopyRoot root)
Copy for unserialization. XXX: need to update for references

Method Detail

clear

public void clear()
Clears the array

Overrides:
clear in class ArrayValueImpl

put

public Value put(Value key,
                 Value value)
Adds a new value.

Overrides:
put in class ArrayValue

append

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

Overrides:
append in class ArrayValueImpl

unshift

public ArrayValue unshift(Value value)
Add to the beginning

Overrides:
unshift in class ArrayValueImpl

splice

public ArrayValue splice(int start,
                         int end,
                         ArrayValue replace)
Replace a section of the array.

Overrides:
splice 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

getDirty

public Value getDirty(Value index)
Returns the value as an array, using copy on write if necessary.

Overrides:
getDirty in class ArrayValueImpl

put

public Value put(Value value)
Add

Overrides:
put in class ArrayValueImpl

putVar

public Var putVar()
Sets the array ref.

Overrides:
putVar in class ArrayValueImpl

remove

public Value remove(Value key)
Removes a value.

Overrides:
remove in class ArrayValueImpl

getVar

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

Overrides:
getVar in class ArrayValueImpl

shuffle

public Value shuffle()
Shuffles the array

Overrides:
shuffle in class ArrayValueImpl

copy

public Value copy()
Copy the value.

Overrides:
copy in class ArrayValueImpl

toLocalRef

public Value toLocalRef()
Convert to an argument value.

Overrides:
toLocalRef in class ArrayValueImpl

copyReturn

public Value copyReturn()
Copy for return.

Overrides:
copyReturn in class ArrayValueImpl

copySaveFunArg

public Value copySaveFunArg()
Copy for saving a method's arguments.

Overrides:
copySaveFunArg in class ArrayValueImpl