com.caucho.quercus.env
Class Var

java.lang.Object
  extended by com.caucho.quercus.env.Value
      extended by com.caucho.quercus.env.Var
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SessionVar

public class Var
extends Value
implements java.io.Serializable

Represents a PHP variable value.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.quercus.env.Value
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V
 
Constructor Summary
Var()
           
Var(Value value)
           
 
Method Summary
 Value abs()
          Absolute value.
 Value add(long rValue)
          Adds to the following value.
 Value add(Value rValue)
          Adds to the following value.
 Value addOne()
          Pre-increment the following value.
 Value append(Value index, Value value)
          Sets the array value, returning the new array, e.g.
 StringValue appendTo(BinaryBuilderValue sb)
          Append to a binary builder.
 StringValue appendTo(LargeStringBuilderValue sb)
          Append to a string builder.
 StringValue appendTo(StringBuilderValue sb)
          Append to a string builder.
 StringValue appendTo(UnicodeBuilderValue sb)
          Append to a unicode builder.
 Value bitAnd(Value rValue)
          Binary And.
 Value bitOr(Value rValue)
          Binary or.
 Value bitXor(Value rValue)
          Binary xor.
 Value call(Env env)
          Evaluates the function.
 Value call(Env env, Value a1)
          Evaluates the function with an argument .
 Value call(Env env, Value[] args)
          Evaluates the function.
 Value call(Env env, Value a1, Value a2)
          Evaluates the function with arguments
 Value call(Env env, Value a1, Value a2, Value a3)
          Evaluates the function with arguments
 Value call(Env env, Value a1, Value a2, Value a3, Value a4)
          Evaluates the function with arguments
 Value call(Env env, Value a1, Value a2, Value a3, Value a4, Value a5)
          Evaluates the function with arguments
 Value callCopy(Env env, Value[] args)
          Evaluates the function, returning a copy
 Value callMethod(Env env, StringValue methodName, int hash)
          Evaluates a method.
 Value callMethod(Env env, StringValue methodName, int hash, Value a1)
          Evaluates a method.
 Value callMethod(Env env, StringValue methodName, int hash, Value[] args)
          Evaluates a method.
 Value callMethod(Env env, StringValue methodName, int hash, Value a1, Value a2)
          Evaluates a method.
 Value callMethod(Env env, StringValue methodName, int hash, Value a1, Value a2, Value a3)
          Evaluates a method with 3 args.
 Value callMethod(Env env, StringValue methodName, int hash, Value a1, Value a2, Value a3, Value a4)
          Evaluates a method with 4 args.
 Value callMethod(Env env, StringValue methodName, int hash, Value a1, Value a2, Value a3, Value a4, Value a5)
          Evaluates a method with 5 args.
 Value callMethodRef(Env env, StringValue methodName, int hash)
          Evaluates a method.
 Value callMethodRef(Env env, StringValue methodName, int hash, Value a1)
          Evaluates a method.
 Value callMethodRef(Env env, StringValue methodName, int hash, Value[] args)
          Evaluates a method.
 Value callMethodRef(Env env, StringValue methodName, int hash, Value a1, Value a2)
          Evaluates a method.
 Value callMethodRef(Env env, StringValue methodName, int hash, Value a1, Value a2, Value a3)
          Evaluates a method with 3 args.
 Value callMethodRef(Env env, StringValue methodName, int hash, Value a1, Value a2, Value a3, Value a4)
          Evaluates a method with 4 args.
 Value callMethodRef(Env env, StringValue methodName, int hash, Value a1, Value a2, Value a3, Value a4, Value a5)
          Evaluates a method with 5 args.
 Value callRef(Env env)
          Evaluates the function.
 Value callRef(Env env, Value a1)
          Evaluates the function with an argument .
 Value callRef(Env env, Value[] args)
          Evaluates the function, returning a reference.
 Value callRef(Env env, Value a1, Value a2)
          Evaluates the function with arguments
 Value callRef(Env env, Value a1, Value a2, Value a3)
          Evaluates the function with arguments
 Value callRef(Env env, Value a1, Value a2, Value a3, Value a4)
          Evaluates the function with arguments
 Value callRef(Env env, Value a1, Value a2, Value a3, Value a4, Value a5)
          Evaluates the function with arguments
 Value charValueAt(long index)
          Returns the character at an index
 Value clone(Env env)
          Clone for the clone keyword
 int cmp(Value rValue)
          Compares the two values
 Value copy()
          Copy the value.
 Value copyArrayItem()
          Copy the value as an array item.
 Value copyReturn()
          Copy the value as a return value.
 Value copyTree(Env env, CopyRoot root)
          Copy for serialization
 Value current()
          Returns the current value
 Value div(Value rValue)
          Divides the following value.
 Value end()
          Returns the end value.
 boolean eq(Value rValue)
          Returns true for equality
 boolean eql(Value rValue)
          Returns true for equality
 boolean geq(Value rValue)
          Returns true for greater than or equal to
 Value get(Value index)
          Returns the array ref.
 Value getArg(Value index, boolean isTop)
          Returns the array ref.
 Value getArray()
          Returns the array ref.
 Value getArray(Value index)
          Returns the value, creating an object if unset.
 java.lang.String getClassName()
          Returns the class name.
 int getCount(Env env)
          Returns the count, as returned by the global php count() function
 int getCountRecursive(Env env)
          Returns the count, as returned by the global php count() function
 Value getDirty(Value index)
          Returns the value, doing a copy-on-write if needed.
 Value getField(Env env, StringValue name)
          Returns the field value.
 Value getFieldArg(Env env, StringValue name, boolean isTop)
          Returns the array ref.
 Value getFieldArray(Env env, StringValue name)
          Returns the field value as an array
 Value getFieldObject(Env env, StringValue name)
          Returns the field value as an object
 Var getFieldVar(Env env, StringValue name)
          Returns the field ref.
 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 getObject(Env env)
          Returns the value, creating an object if unset.
 Value getObject(Env env, Value index)
          Returns the value, creating an object if unset.
 Value getRawValue()
          Returns to the value value.
 java.lang.String getResourceType()
           
 int getSize()
          Returns the array/object size
 Value getThisField(Env env, StringValue name)
          Returns the field value.
 Value getThisFieldArg(Env env, StringValue name)
          Returns the array ref.
 Value getThisFieldArray(Env env, StringValue name)
          Returns the field value as an array
 Value getThisFieldObject(Env env, StringValue name)
          Returns the field value as an object
 Var getThisFieldVar(Env env, StringValue name)
          Returns the field ref.
 java.lang.String getType()
          Returns the type.
 java.util.Iterator<Value> getValueIterator(Env env)
          Returns an iterator for the field values.
 ValueType getValueType()
          Returns the ValueType.
 Var getVar(Value index)
          Returns the array ref.
 boolean gt(Value rValue)
          Returns true for greater than
 boolean hasCurrent()
          Returns true if there are more elements.
 Value increment(int incr)
          Increment the following value.
 void initField(StringValue key, Value value, FieldVisibility visibility)
          Initializes a new field, does not call __set if it is defined.
 boolean isA(java.lang.String name)
          Returns true for an implementation of a class
 boolean isArray()
          Returns true for an array.
 boolean isBinary()
          Returns true for a BinaryValue.
 boolean isBoolean()
          Returns true for a BooleanValue
 boolean isDefault()
          Returns true for a DefaultValue
 boolean isDouble()
          Returns true for a long-value.
 boolean isDoubleConvertible()
          True to a double.
 boolean isEmpty()
          Returns true if the value is empty
 boolean isLong()
          Returns true for a long-value.
 boolean isLongConvertible()
          True for a long
 boolean isNull()
          True if the object is null
 boolean isNumberConvertible()
          True for a number
 boolean isNumeric()
          Returns true for is_numeric
 boolean isObject()
          Returns true for an object.
 boolean isResource()
           
 boolean isset()
          Returns true if the value is set
 boolean isset(Value index)
          Return true if the array value is set
 boolean issetField(StringValue name)
          Returns true if the field is set.
 boolean issetThisField(StringValue name)
          Returns true if the field is set.
 boolean isString()
          Returns true for a StringValue.
 boolean isUnicode()
          Returns true for a UnicodeValue.
 boolean isVar()
           
 void jsonEncode(Env env, StringValue sb)
          Encodes the value in JSON.
 Value key()
          Returns the current key
 int length()
          Returns the length as a string.
 boolean leq(Value rValue)
          Returns true for less than or equal to
 Value lshift(Value rValue)
          Shifts left by the value.
 boolean lt(Value rValue)
          Returns true for less than
 Value mul(long lValue)
          Multiplies to the following value.
 Value mul(Value rValue)
          Multiplies to the following value.
 Value neg()
          Negates the value.
 Value next()
          Returns the current value
 Value pop(Env env)
          Pops the top array element.
 Value postdecr()
          Post-increment the following value.
 Value postincr()
          Post-increment the following value.
 Value postincr(int incr)
          Post-increment the following value.
 Value predecr()
          Pre-increment the following value.
 Value preincr()
          Pre-increment the following value.
 Value preincr(int incr)
          Pre-increment the following value.
 Value prev()
          Returns the previous value
 void print(Env env)
          Prints the value.
 void print(Env env, WriteStream out)
          Prints the value.
 Value put(Value value)
          Returns the array ref.
 Value put(Value index, Value value)
          Returns the array ref.
 Value putField(Env env, StringValue name, Value value)
          Sets the field.
 Value putThisField(Env env, StringValue name, Value value)
          Sets the field.
 Var putVar()
          Returns the array ref.
 Value remove(Value index)
          Return unset the value.
 Value reset()
          Returns the array pointer.
 Value rshift(Value rValue)
          Shifts right by the value.
 void serialize(Env env, java.lang.StringBuilder sb)
          Serializes the value.
 void serialize(Env env, java.lang.StringBuilder sb, SerializeMap serializeMap)
          Serializes the value.
 Value set(Value value)
          Sets the value.
 Value setCharValueAt(long index, Value value)
          Sets the character at an index
protected  Value setRaw(Value value)
          Sets the value.
 Var setRef(Value value)
          Sets the value, possibly replacing if a var and returning the resulting var $a =& (...).
 Value shuffle()
          Shuffles the array.
 Value sub(long rValue)
          Subtracts to the following value.
 Value sub(Value rValue)
          Subtracts to the following value.
 Value subOne()
          Pre-increment the following value.
 Value toArgRef()
          Converts to a reference variable
 Value toArray()
          Converts to an array
 ArrayValue toArrayValue(Env env)
          Converts to an array
 Value toAutoArray()
          Converts to an array
 java.math.BigDecimal toBigDecimal()
          Converts to a Java BigDecimal.
 java.math.BigInteger toBigInteger()
          Converts to a Java BigInteger.
 StringValue toBinaryValue(Env env)
          Converts to a BinaryValue.
 int toBinaryValueMarshalCost()
          Cost to convert to a binary value
 boolean toBoolean()
          Converts to a boolean.
 int toBooleanMarshalCost()
          Cost to convert to a boolean
 int toByteArrayMarshalCost()
          Cost to convert to a byte[]
 int toByteMarshalCost()
          Cost to convert to a byte
 Callable toCallable(Env env)
          Converts to a callable
 int toCharArrayMarshalCost()
          Cost to convert to a char[]
 int toCharMarshalCost()
          Cost to convert to a character
 double toDouble()
          Converts to a double.
 int toDoubleMarshalCost()
          Cost to convert to a double
 DoubleValue toDoubleValue()
          Converts to a double.
 int toFloatMarshalCost()
          Cost to convert to a float
 java.io.InputStream toInputStream()
          Returns a byteArrayInputStream for the value.
 int toIntegerMarshalCost()
          Cost to convert to an integer
 java.util.Calendar toJavaCalendar()
          Converts to a Java Calendar.
 java.util.Collection toJavaCollection(Env env, java.lang.Class type)
          Converts to a java Collection object.
 java.util.Date toJavaDate()
          Converts to a Java Date.
 java.util.List toJavaList(Env env, java.lang.Class type)
          Converts to a java List object.
 java.util.Map toJavaMap(Env env, java.lang.Class type)
          Converts to a java map.
 java.lang.Object toJavaObject()
          Converts to an object.
 java.lang.Object toJavaObject(Env env, java.lang.Class type)
          Converts to an object.
 int toJavaObjectMarshalCost()
          Cost to convert to a Java object
 java.lang.Object toJavaObjectNotNull(Env env, java.lang.Class type)
          Converts to an object.
 java.lang.String toJavaString()
          Converts to a java String object.
 java.net.URL toJavaURL(Env env)
          Converts to a Java URL.
 Value toKey()
          Converts to a key.
 Value toLocalRef()
          Convert to a function argument value, e.g.
 Value toLocalValue()
          Converts to a raw value.
 Value toLocalValueReadOnly()
          Converts to a function argument value that is never assigned or modified.
 Var toLocalVar()
          Converts to a local argument variable
 Var toLocalVarDeclAsRef()
          Converts to a reference variable
 long toLong()
          Converts to a long.
 int toLongMarshalCost()
          Cost to convert to a long
 LongValue toLongValue()
          Converts to a long.
 Value toObject(Env env)
          Converts to an object.
 Value toRef()
          Converts to a variable reference (for function arguments)
 Value toRefValue()
          Converts to a function argument ref value, i.e.
 int toShortMarshalCost()
          Cost to convert to a short
 java.lang.String toString()
           
 StringValue toString(Env env)
          Converts to a string.
 StringValue toStringBuilder()
          Converts to a string builder
 StringValue toStringBuilder(Env env)
          Converts to a string builder
 StringValue toStringBuilder(Env env, StringValue value)
          Converts to a string builder
 StringValue toStringBuilder(Env env, Value value)
          Converts to a string builder
 int toStringMarshalCost()
          Cost to convert to a string
 StringValue toStringValue()
          Converts to a StringValue.
 StringValue toStringValue(Env env)
           
 int toStringValueMarshalCost()
          Cost to convert to a StringValue
 StringValue toUnicode(Env env)
          Converts to a Unicode string.
 StringValue toUnicodeValue(Env env)
          Converts to a UnicodeValue for marshaling, so it will create a UnicodeValue event when unicode.semantics=false.
 int toUnicodeValueMarshalCost()
          Cost to convert to a UnicdeValue
 Value toValue()
          Converts to a raw value.
 Var toVar()
          Converts to a variable
 void unsetField(StringValue name)
          Unsets the field.
 void unsetThisField(StringValue name)
          Unsets the field.
 java.lang.Object valuesToArray(Env env, java.lang.Class elementType)
          Takes the values of this array, unmarshalls them to objects of type elementType, and puts them in a java array.
 void varDumpImpl(Env env, WriteStream out, int depth, java.util.IdentityHashMap<Value,java.lang.String> valueSet)
           
 java.lang.Object writeReplace()
           
 
Methods inherited from class com.caucho.quercus.env.Value
callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, checkPrivate, checkProtected, containsKey, copy, copy, copySaveFunArg, copyStringBuilder, div, eqValue, findFunction, generate, getBaseIterator, getCallableName, getCalledClass, getFieldArgRef, getHashCode, getKeyArray, getQuercusClass, getRef, getThisFieldArgRef, getValueArray, hashCode, isA, isCallable, isFieldInit, keyExists, mod, nextIndex, pos, printDepth, printJavaChar, printJavaString, printR, printRImpl, put, putField, putField, putObject, putThisField, setFieldInit, setJavaObject, sub_rev, toAutoObject, toBinaryValue, toBinaryValue, toChar, toDebugString, toException, toInt, toInternString, toJavaBoolean, toJavaByte, toJavaCharacter, toJavaDouble, toJavaFloat, toJavaInteger, toJavaLong, toJavaShort, toLocalThis, toUnicodeValue, unsetArray, unsetThisArray, varDump, varExport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Var

public Var()

Var

public Var(Value value)
Method Detail

set

public Value set(Value value)
Sets the value.

Overrides:
set in class Value

isVar

public boolean isVar()
Overrides:
isVar in class Value

setRef

public Var setRef(Value value)
Sets the value, possibly replacing if a var and returning the resulting var $a =& (...).


setRaw

protected Value setRaw(Value value)
Sets the value.


getType

public java.lang.String getType()
Returns the type.

Overrides:
getType in class Value

getResourceType

public java.lang.String getResourceType()
Overrides:
getResourceType in class Value

getValueType

public ValueType getValueType()
Returns the ValueType.

Overrides:
getValueType in class Value

getClassName

public java.lang.String getClassName()
Returns the class name.

Overrides:
getClassName in class Value

isObject

public boolean isObject()
Returns true for an object.

Overrides:
isObject in class Value

isResource

public boolean isResource()
Overrides:
isResource in class Value

isA

public boolean isA(java.lang.String name)
Returns true for an implementation of a class

Overrides:
isA in class Value

isLongConvertible

public boolean isLongConvertible()
True for a long

Overrides:
isLongConvertible in class Value

isDoubleConvertible

public boolean isDoubleConvertible()
True to a double.

Overrides:
isDoubleConvertible in class Value

isNumberConvertible

public boolean isNumberConvertible()
True for a number

Overrides:
isNumberConvertible in class Value

isLong

public boolean isLong()
Returns true for a long-value.

Overrides:
isLong in class Value

isDouble

public boolean isDouble()
Returns true for a long-value.

Overrides:
isDouble in class Value

isNumeric

public boolean isNumeric()
Returns true for is_numeric

Overrides:
isNumeric in class Value

isString

public boolean isString()
Returns true for a StringValue.

Overrides:
isString in class Value

isBinary

public boolean isBinary()
Returns true for a BinaryValue.

Overrides:
isBinary in class Value

isUnicode

public boolean isUnicode()
Returns true for a UnicodeValue.

Overrides:
isUnicode in class Value

isBoolean

public boolean isBoolean()
Returns true for a BooleanValue

Overrides:
isBoolean in class Value

isDefault

public boolean isDefault()
Returns true for a DefaultValue

Overrides:
isDefault in class Value

isset

public boolean isset()
Returns true if the value is set

Overrides:
isset in class Value

isEmpty

public boolean isEmpty()
Returns true if the value is empty

Overrides:
isEmpty in class Value

isNull

public boolean isNull()
True if the object is null

Overrides:
isNull in class Value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toBoolean

public boolean toBoolean()
Converts to a boolean.

Overrides:
toBoolean in class Value

toLong

public long toLong()
Converts to a long.

Overrides:
toLong in class Value

toDouble

public double toDouble()
Converts to a double.

Overrides:
toDouble in class Value

toLongValue

public LongValue toLongValue()
Converts to a long.

Overrides:
toLongValue in class Value

toDoubleValue

public DoubleValue toDoubleValue()
Converts to a double.

Overrides:
toDoubleValue in class Value

toString

public StringValue toString(Env env)
Converts to a string.

Overrides:
toString in class Value
Parameters:
env -

toJavaString

public java.lang.String toJavaString()
Converts to a java String object.

Overrides:
toJavaString in class Value

toJavaObject

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

Overrides:
toJavaObject in class Value

toJavaObject

public java.lang.Object toJavaObject(Env env,
                                     java.lang.Class type)
Converts to an object.

Overrides:
toJavaObject in class Value

toJavaObjectNotNull

public java.lang.Object toJavaObjectNotNull(Env env,
                                            java.lang.Class type)
Converts to an object.

Overrides:
toJavaObjectNotNull in class Value

toJavaCollection

public java.util.Collection toJavaCollection(Env env,
                                             java.lang.Class type)
Converts to a java Collection object.

Overrides:
toJavaCollection in class Value

toJavaList

public java.util.List toJavaList(Env env,
                                 java.lang.Class type)
Converts to a java List object.

Overrides:
toJavaList in class Value

toJavaMap

public java.util.Map toJavaMap(Env env,
                               java.lang.Class type)
Converts to a java map.

Overrides:
toJavaMap in class Value

toJavaCalendar

public java.util.Calendar toJavaCalendar()
Converts to a Java Calendar.

Overrides:
toJavaCalendar in class Value

toJavaDate

public java.util.Date toJavaDate()
Converts to a Java Date.

Overrides:
toJavaDate in class Value

toJavaURL

public java.net.URL toJavaURL(Env env)
Converts to a Java URL.

Overrides:
toJavaURL in class Value

toBigDecimal

public java.math.BigDecimal toBigDecimal()
Converts to a Java BigDecimal.

Overrides:
toBigDecimal in class Value

toBigInteger

public java.math.BigInteger toBigInteger()
Converts to a Java BigInteger.

Overrides:
toBigInteger in class Value

toArray

public Value toArray()
Converts to an array

Overrides:
toArray in class Value

toArrayValue

public ArrayValue toArrayValue(Env env)
Converts to an array

Overrides:
toArrayValue in class Value

toAutoArray

public Value toAutoArray()
Converts to an array

Overrides:
toAutoArray in class Value

toObject

public Value toObject(Env env)
Converts to an object.

Overrides:
toObject in class Value

toBooleanMarshalCost

public int toBooleanMarshalCost()
Cost to convert to a boolean

Overrides:
toBooleanMarshalCost in class Value

toByteMarshalCost

public int toByteMarshalCost()
Cost to convert to a byte

Overrides:
toByteMarshalCost in class Value

toShortMarshalCost

public int toShortMarshalCost()
Cost to convert to a short

Overrides:
toShortMarshalCost in class Value

toIntegerMarshalCost

public int toIntegerMarshalCost()
Cost to convert to an integer

Overrides:
toIntegerMarshalCost in class Value

toLongMarshalCost

public int toLongMarshalCost()
Cost to convert to a long

Overrides:
toLongMarshalCost in class Value

toDoubleMarshalCost

public int toDoubleMarshalCost()
Cost to convert to a double

Overrides:
toDoubleMarshalCost in class Value

toFloatMarshalCost

public int toFloatMarshalCost()
Cost to convert to a float

Overrides:
toFloatMarshalCost in class Value

toCharMarshalCost

public int toCharMarshalCost()
Cost to convert to a character

Overrides:
toCharMarshalCost in class Value

toStringMarshalCost

public int toStringMarshalCost()
Cost to convert to a string

Overrides:
toStringMarshalCost in class Value

toByteArrayMarshalCost

public int toByteArrayMarshalCost()
Cost to convert to a byte[]

Overrides:
toByteArrayMarshalCost in class Value

toCharArrayMarshalCost

public int toCharArrayMarshalCost()
Cost to convert to a char[]

Overrides:
toCharArrayMarshalCost in class Value

toJavaObjectMarshalCost

public int toJavaObjectMarshalCost()
Cost to convert to a Java object

Overrides:
toJavaObjectMarshalCost in class Value

toBinaryValueMarshalCost

public int toBinaryValueMarshalCost()
Cost to convert to a binary value

Overrides:
toBinaryValueMarshalCost in class Value

toStringValueMarshalCost

public int toStringValueMarshalCost()
Cost to convert to a StringValue

Overrides:
toStringValueMarshalCost in class Value

toUnicodeValueMarshalCost

public int toUnicodeValueMarshalCost()
Cost to convert to a UnicdeValue

Overrides:
toUnicodeValueMarshalCost in class Value

appendTo

public StringValue appendTo(UnicodeBuilderValue sb)
Append to a unicode builder.

Overrides:
appendTo in class Value

appendTo

public StringValue appendTo(BinaryBuilderValue sb)
Append to a binary builder.

Overrides:
appendTo in class Value

appendTo

public StringValue appendTo(StringBuilderValue sb)
Append to a string builder.

Overrides:
appendTo in class Value

appendTo

public StringValue appendTo(LargeStringBuilderValue sb)
Append to a string builder.

Overrides:
appendTo in class Value

getRawValue

public final Value getRawValue()
Returns to the value value.


toValue

public final Value toValue()
Converts to a raw value.

Overrides:
toValue in class Value

toLocalValueReadOnly

public Value toLocalValueReadOnly()
Converts to a function argument value that is never assigned or modified.

Overrides:
toLocalValueReadOnly in class Value

toLocalValue

public Value toLocalValue()
Converts to a raw value.

Overrides:
toLocalValue in class Value

toLocalRef

public Value toLocalRef()
Convert to a function argument value, e.g. for function foo($a) where $a may be assigned.

Overrides:
toLocalRef in class Value

toRefValue

public Value toRefValue()
Converts to a function argument ref value, i.e. an argument declared as a reference, but not assigned

Overrides:
toRefValue in class Value

toVar

public Var toVar()
Converts to a variable

Overrides:
toVar in class Value

toLocalVar

public Var toLocalVar()
Converts to a local argument variable

Overrides:
toLocalVar in class Value

toLocalVarDeclAsRef

public Var toLocalVarDeclAsRef()
Converts to a reference variable

Overrides:
toLocalVarDeclAsRef in class Value

toArgRef

public Value toArgRef()
Converts to a reference variable

Overrides:
toArgRef in class Value

toKey

public Value toKey()
Converts to a key.

Overrides:
toKey in class Value

toStringValue

public StringValue toStringValue()
Description copied from class: Value
Converts to a StringValue.

Overrides:
toStringValue in class Value

toStringValue

public StringValue toStringValue(Env env)
Overrides:
toStringValue in class Value

toBinaryValue

public StringValue toBinaryValue(Env env)
Description copied from class: Value
Converts to a BinaryValue.

Overrides:
toBinaryValue in class Value

toUnicode

public StringValue toUnicode(Env env)
Description copied from class: Value
Converts to a Unicode string. For unicode.semantics=false, this will still return a StringValue. For unicode.semantics=true, this will return a UnicodeStringValue.

Overrides:
toUnicode in class Value

toUnicodeValue

public StringValue toUnicodeValue(Env env)
Description copied from class: Value
Converts to a UnicodeValue for marshaling, so it will create a UnicodeValue event when unicode.semantics=false.

Overrides:
toUnicodeValue in class Value

toStringBuilder

public StringValue toStringBuilder()
Description copied from class: Value
Converts to a string builder

Overrides:
toStringBuilder in class Value

toStringBuilder

public StringValue toStringBuilder(Env env)
Description copied from class: Value
Converts to a string builder

Overrides:
toStringBuilder in class Value

toStringBuilder

public StringValue toStringBuilder(Env env,
                                   Value value)
Converts to a string builder

Overrides:
toStringBuilder in class Value

toStringBuilder

public StringValue toStringBuilder(Env env,
                                   StringValue value)
Converts to a string builder

Overrides:
toStringBuilder in class Value

toInputStream

public java.io.InputStream toInputStream()
Description copied from class: Value
Returns a byteArrayInputStream for the value. See TempBufferStringValue for how this can be overriden

Overrides:
toInputStream in class Value
Returns:
InputStream

toCallable

public Callable toCallable(Env env)
Description copied from class: Value
Converts to a callable

Overrides:
toCallable in class Value

copy

public Value copy()
Copy the value.

Overrides:
copy in class Value

copyTree

public Value copyTree(Env env,
                      CopyRoot root)
Copy for serialization

Overrides:
copyTree in class Value

clone

public Value clone(Env env)
Clone for the clone keyword

Overrides:
clone in class Value

copyArrayItem

public Value copyArrayItem()
Copy the value as an array item.

Overrides:
copyArrayItem in class Value

copyReturn

public Value copyReturn()
Copy the value as a return value.

Overrides:
copyReturn in class Value

toRef

public Value toRef()
Converts to a variable reference (for function arguments)

Overrides:
toRef in class Value

isArray

public boolean isArray()
Returns true for an array.

Overrides:
isArray in class Value

neg

public Value neg()
Negates the value.

Overrides:
neg in class Value

add

public Value add(Value rValue)
Adds to the following value.

Overrides:
add in class Value

add

public Value add(long rValue)
Adds to the following value.

Overrides:
add in class Value

preincr

public Value preincr(int incr)
Pre-increment the following value.

Overrides:
preincr in class Value

postincr

public Value postincr(int incr)
Post-increment the following value.

Overrides:
postincr in class Value

addOne

public Value addOne()
Pre-increment the following value.

Overrides:
addOne in class Value

subOne

public Value subOne()
Pre-increment the following value.

Overrides:
subOne in class Value

preincr

public Value preincr()
Pre-increment the following value.

Overrides:
preincr in class Value

predecr

public Value predecr()
Pre-increment the following value.

Overrides:
predecr in class Value

postincr

public Value postincr()
Post-increment the following value.

Overrides:
postincr in class Value

postdecr

public Value postdecr()
Post-increment the following value.

Overrides:
postdecr in class Value

increment

public Value increment(int incr)
Increment the following value.

Overrides:
increment in class Value

sub

public Value sub(Value rValue)
Subtracts to the following value.

Overrides:
sub in class Value

sub

public Value sub(long rValue)
Subtracts to the following value.

Overrides:
sub in class Value

mul

public Value mul(Value rValue)
Multiplies to the following value.

Overrides:
mul in class Value

mul

public Value mul(long lValue)
Multiplies to the following value.

Overrides:
mul in class Value

div

public Value div(Value rValue)
Divides the following value.

Overrides:
div in class Value

lshift

public Value lshift(Value rValue)
Shifts left by the value.

Overrides:
lshift in class Value

rshift

public Value rshift(Value rValue)
Shifts right by the value.

Overrides:
rshift in class Value

bitAnd

public Value bitAnd(Value rValue)
Binary And.

Overrides:
bitAnd in class Value

bitOr

public Value bitOr(Value rValue)
Binary or.

Overrides:
bitOr in class Value

bitXor

public Value bitXor(Value rValue)
Binary xor.

Overrides:
bitXor in class Value

abs

public Value abs()
Absolute value.

Overrides:
abs in class Value

eq

public boolean eq(Value rValue)
Returns true for equality

Overrides:
eq in class Value

eql

public boolean eql(Value rValue)
Returns true for equality

Overrides:
eql in class Value

cmp

public int cmp(Value rValue)
Compares the two values

Overrides:
cmp in class Value

lt

public boolean lt(Value rValue)
Returns true for less than

Overrides:
lt in class Value

leq

public boolean leq(Value rValue)
Returns true for less than or equal to

Overrides:
leq in class Value

gt

public boolean gt(Value rValue)
Returns true for greater than

Overrides:
gt in class Value

geq

public boolean geq(Value rValue)
Returns true for greater than or equal to

Overrides:
geq in class Value

length

public int length()
Returns the length as a string.

Overrides:
length in class Value

getSize

public int getSize()
Returns the array/object size

Overrides:
getSize in class Value

getCount

public int getCount(Env env)
Returns the count, as returned by the global php count() function

Overrides:
getCount in class Value

getCountRecursive

public int getCountRecursive(Env env)
Returns the count, as returned by the global php count() function

Overrides:
getCountRecursive in class Value

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 Value

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 Value

getArray

public Value getArray()
Returns the array ref.

Overrides:
getArray in class Value

getObject

public Value getObject(Env env)
Returns the value, creating an object if unset.

Overrides:
getObject in class Value

get

public Value get(Value index)
Returns the array ref.

Overrides:
get in class Value

getVar

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

Overrides:
getVar in class Value

getArg

public Value getArg(Value index,
                    boolean isTop)
Returns the array ref.

Overrides:
getArg in class Value

getArray

public Value getArray(Value index)
Returns the value, creating an object if unset.

Overrides:
getArray in class Value

getDirty

public Value getDirty(Value index)
Returns the value, doing a copy-on-write if needed.

Overrides:
getDirty in class Value

getObject

public Value getObject(Env env,
                       Value index)
Returns the value, creating an object if unset.

Overrides:
getObject in class Value

put

public Value put(Value index,
                 Value value)
Returns the array ref.

Overrides:
put in class Value

append

public Value append(Value index,
                    Value value)
Sets the array value, returning the new array, e.g. to handle string update ($a[0] = 'A').

Overrides:
append in class Value

put

public Value put(Value value)
Returns the array ref.

Overrides:
put in class Value

putVar

public Var putVar()
Returns the array ref.

Overrides:
putVar in class Value

isset

public boolean isset(Value index)
Return true if the array value is set

Overrides:
isset in class Value

remove

public Value remove(Value index)
Return unset the value.

Overrides:
remove in class Value

getField

public Value getField(Env env,
                      StringValue name)
Returns the field value.

Overrides:
getField in class Value

getFieldVar

public Var getFieldVar(Env env,
                       StringValue name)
Returns the field ref.

Overrides:
getFieldVar in class Value

getFieldArg

public Value getFieldArg(Env env,
                         StringValue name,
                         boolean isTop)
Returns the array ref.

Overrides:
getFieldArg in class Value

getFieldArray

public Value getFieldArray(Env env,
                           StringValue name)
Returns the field value as an array

Overrides:
getFieldArray in class Value

getFieldObject

public Value getFieldObject(Env env,
                            StringValue name)
Returns the field value as an object

Overrides:
getFieldObject in class Value

putField

public Value putField(Env env,
                      StringValue name,
                      Value value)
Sets the field.

Overrides:
putField in class Value

issetField

public boolean issetField(StringValue name)
Returns true if the field is set.

Overrides:
issetField in class Value

unsetField

public void unsetField(StringValue name)
Unsets the field.

Overrides:
unsetField in class Value

getThisField

public Value getThisField(Env env,
                          StringValue name)
Returns the field value.

Overrides:
getThisField in class Value

getThisFieldVar

public Var getThisFieldVar(Env env,
                           StringValue name)
Returns the field ref.

Overrides:
getThisFieldVar in class Value

getThisFieldArg

public Value getThisFieldArg(Env env,
                             StringValue name)
Returns the array ref.

Overrides:
getThisFieldArg in class Value

getThisFieldArray

public Value getThisFieldArray(Env env,
                               StringValue name)
Returns the field value as an array

Overrides:
getThisFieldArray in class Value

getThisFieldObject

public Value getThisFieldObject(Env env,
                                StringValue name)
Returns the field value as an object

Overrides:
getThisFieldObject in class Value

initField

public void initField(StringValue key,
                      Value value,
                      FieldVisibility visibility)
Initializes a new field, does not call __set if it is defined.

Overrides:
initField in class Value

putThisField

public Value putThisField(Env env,
                          StringValue name,
                          Value value)
Sets the field.

Overrides:
putThisField in class Value

issetThisField

public boolean issetThisField(StringValue name)
Returns true if the field is set.

Overrides:
issetThisField in class Value

unsetThisField

public void unsetThisField(StringValue name)
Unsets the field.

Overrides:
unsetThisField in class Value

valuesToArray

public java.lang.Object valuesToArray(Env env,
                                      java.lang.Class elementType)
Takes the values of this array, unmarshalls them to objects of type elementType, and puts them in a java array.

Overrides:
valuesToArray in class Value

charValueAt

public Value charValueAt(long index)
Returns the character at an index

Overrides:
charValueAt in class Value

setCharValueAt

public Value setCharValueAt(long index,
                            Value value)
Sets the character at an index

Overrides:
setCharValueAt in class Value

hasCurrent

public boolean hasCurrent()
Returns true if there are more elements.

Overrides:
hasCurrent in class Value

key

public Value key()
Returns the current key

Overrides:
key in class Value

current

public Value current()
Returns the current value

Overrides:
current in class Value

next

public Value next()
Returns the current value

Overrides:
next in class Value

prev

public Value prev()
Returns the previous value

Overrides:
prev in class Value

end

public Value end()
Returns the end value.

Overrides:
end in class Value

reset

public Value reset()
Returns the array pointer.

Overrides:
reset in class Value

shuffle

public Value shuffle()
Shuffles the array.

Overrides:
shuffle in class Value

pop

public Value pop(Env env)
Pops the top array element.

Overrides:
pop in class Value

call

public Value call(Env env,
                  Value[] args)
Evaluates the function.

Overrides:
call in class Value

callRef

public Value callRef(Env env,
                     Value[] args)
Evaluates the function, returning a reference.

Overrides:
callRef in class Value

callCopy

public Value callCopy(Env env,
                      Value[] args)
Evaluates the function, returning a copy

Overrides:
callCopy in class Value

call

public Value call(Env env)
Evaluates the function.

Overrides:
call in class Value

callRef

public Value callRef(Env env)
Evaluates the function.

Overrides:
callRef in class Value

call

public Value call(Env env,
                  Value a1)
Evaluates the function with an argument .

Overrides:
call in class Value

callRef

public Value callRef(Env env,
                     Value a1)
Evaluates the function with an argument .

Overrides:
callRef in class Value

call

public Value call(Env env,
                  Value a1,
                  Value a2)
Evaluates the function with arguments

Overrides:
call in class Value

callRef

public Value callRef(Env env,
                     Value a1,
                     Value a2)
Evaluates the function with arguments

Overrides:
callRef in class Value

call

public Value call(Env env,
                  Value a1,
                  Value a2,
                  Value a3)
Evaluates the function with arguments

Overrides:
call in class Value

callRef

public Value callRef(Env env,
                     Value a1,
                     Value a2,
                     Value a3)
Evaluates the function with arguments

Overrides:
callRef in class Value

call

public Value call(Env env,
                  Value a1,
                  Value a2,
                  Value a3,
                  Value a4)
Evaluates the function with arguments

Overrides:
call in class Value

callRef

public Value callRef(Env env,
                     Value a1,
                     Value a2,
                     Value a3,
                     Value a4)
Evaluates the function with arguments

Overrides:
callRef in class Value

call

public Value call(Env env,
                  Value a1,
                  Value a2,
                  Value a3,
                  Value a4,
                  Value a5)
Evaluates the function with arguments

Overrides:
call in class Value

callRef

public Value callRef(Env env,
                     Value a1,
                     Value a2,
                     Value a3,
                     Value a4,
                     Value a5)
Evaluates the function with arguments

Overrides:
callRef in class Value

callMethod

public Value callMethod(Env env,
                        StringValue methodName,
                        int hash,
                        Value[] args)
Evaluates a method.

Overrides:
callMethod in class Value

callMethodRef

public Value callMethodRef(Env env,
                           StringValue methodName,
                           int hash,
                           Value[] args)
Evaluates a method.

Overrides:
callMethodRef in class Value

callMethod

public Value callMethod(Env env,
                        StringValue methodName,
                        int hash)
Evaluates a method.

Overrides:
callMethod in class Value

callMethodRef

public Value callMethodRef(Env env,
                           StringValue methodName,
                           int hash)
Evaluates a method.

Overrides:
callMethodRef in class Value

callMethod

public Value callMethod(Env env,
                        StringValue methodName,
                        int hash,
                        Value a1)
Evaluates a method.

Overrides:
callMethod in class Value

callMethodRef

public Value callMethodRef(Env env,
                           StringValue methodName,
                           int hash,
                           Value a1)
Evaluates a method.

Overrides:
callMethodRef in class Value

callMethod

public Value callMethod(Env env,
                        StringValue methodName,
                        int hash,
                        Value a1,
                        Value a2)
Evaluates a method.

Overrides:
callMethod in class Value

callMethodRef

public Value callMethodRef(Env env,
                           StringValue methodName,
                           int hash,
                           Value a1,
                           Value a2)
Evaluates a method.

Overrides:
callMethodRef in class Value

callMethod

public Value callMethod(Env env,
                        StringValue methodName,
                        int hash,
                        Value a1,
                        Value a2,
                        Value a3)
Evaluates a method with 3 args.

Overrides:
callMethod in class Value

callMethodRef

public Value callMethodRef(Env env,
                           StringValue methodName,
                           int hash,
                           Value a1,
                           Value a2,
                           Value a3)
Evaluates a method with 3 args.

Overrides:
callMethodRef in class Value

callMethod

public Value callMethod(Env env,
                        StringValue methodName,
                        int hash,
                        Value a1,
                        Value a2,
                        Value a3,
                        Value a4)
Evaluates a method with 4 args.

Overrides:
callMethod in class Value

callMethodRef

public Value callMethodRef(Env env,
                           StringValue methodName,
                           int hash,
                           Value a1,
                           Value a2,
                           Value a3,
                           Value a4)
Evaluates a method with 4 args.

Overrides:
callMethodRef in class Value

callMethod

public Value callMethod(Env env,
                        StringValue methodName,
                        int hash,
                        Value a1,
                        Value a2,
                        Value a3,
                        Value a4,
                        Value a5)
Evaluates a method with 5 args.

Overrides:
callMethod in class Value

callMethodRef

public Value callMethodRef(Env env,
                           StringValue methodName,
                           int hash,
                           Value a1,
                           Value a2,
                           Value a3,
                           Value a4,
                           Value a5)
Evaluates a method with 5 args.

Overrides:
callMethodRef in class Value

print

public void print(Env env)
Prints the value.

Overrides:
print in class Value
Parameters:
env -

print

public void print(Env env,
                  WriteStream out)
Prints the value.

Overrides:
print in class Value
Parameters:
env -

serialize

public void serialize(Env env,
                      java.lang.StringBuilder sb)
Serializes the value.

Overrides:
serialize in class Value

serialize

public void serialize(Env env,
                      java.lang.StringBuilder sb,
                      SerializeMap serializeMap)
Description copied from class: Value
Serializes the value.

Overrides:
serialize in class Value
sb - holds result of serialization
serializeMap - holds reference indexes

jsonEncode

public void jsonEncode(Env env,
                       StringValue sb)
Encodes the value in JSON.

Overrides:
jsonEncode in class Value

varDumpImpl

public void varDumpImpl(Env env,
                        WriteStream out,
                        int depth,
                        java.util.IdentityHashMap<Value,java.lang.String> valueSet)
                 throws java.io.IOException
Overrides:
varDumpImpl in class Value
Throws:
java.io.IOException

writeReplace

public java.lang.Object writeReplace()