com.caucho.quercus.lib.spl
Class ArrayAccessDelegate

java.lang.Object
  extended by com.caucho.quercus.lib.spl.ArrayAccessDelegate
All Implemented Interfaces:
ArrayDelegate

public class ArrayAccessDelegate
extends java.lang.Object
implements ArrayDelegate

A delegate that intercepts array access methods on the target objects that implement the ArrayAccess interface.


Constructor Summary
ArrayAccessDelegate()
           
 
Method Summary
 long count(ObjectValue qThis)
          Returns the array count
 Value get(ObjectValue qThis, Value index)
          Returns the value for the specified key.
 boolean isset(ObjectValue qThis, Value index)
          Returns true if the value is set
 Value put(ObjectValue qThis, Value index)
          Appends a value.
 Value put(ObjectValue qThis, Value index, Value value)
          Sets the value for the spoecified key.
 Value unset(ObjectValue qThis, Value index)
          Removes the value at the speified key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayAccessDelegate

public ArrayAccessDelegate()
Method Detail

get

public Value get(ObjectValue qThis,
                 Value index)
Description copied from interface: ArrayDelegate
Returns the value for the specified key.

Specified by:
get in interface ArrayDelegate

put

public Value put(ObjectValue qThis,
                 Value index,
                 Value value)
Description copied from interface: ArrayDelegate
Sets the value for the spoecified key.

Specified by:
put in interface ArrayDelegate

put

public Value put(ObjectValue qThis,
                 Value index)
Description copied from interface: ArrayDelegate
Appends a value.

Specified by:
put in interface ArrayDelegate

isset

public boolean isset(ObjectValue qThis,
                     Value index)
Description copied from interface: ArrayDelegate
Returns true if the value is set

Specified by:
isset in interface ArrayDelegate

unset

public Value unset(ObjectValue qThis,
                   Value index)
Description copied from interface: ArrayDelegate
Removes the value at the speified key.

Specified by:
unset in interface ArrayDelegate

count

public long count(ObjectValue qThis)
Description copied from interface: ArrayDelegate
Returns the array count

Specified by:
count in interface ArrayDelegate