com.caucho.quercus.lib.spl
Class ArrayIterator

java.lang.Object
  extended by com.caucho.quercus.lib.spl.ArrayIterator
All Implemented Interfaces:
ArrayAccess, Countable, Iterator, SeekableIterator, Traversable

public class ArrayIterator
extends java.lang.Object
implements SeekableIterator, ArrayAccess, Countable


Field Summary
static int ARRAY_AS_PROPS
           
static int STD_PROP_LIST
           
 
Constructor Summary
ArrayIterator()
           
 
Method Summary
 Value __construct(Env env, Value qThis, Value value, int flags)
           
 void append(Value value)
           
 void asort(ArrayValue array, long sortFlag)
           
 int count()
           
 Value current(Env env)
          Returns the current value.
 Value getArrayCopy()
           
 int getFlags()
           
 Value key(Env env)
          Returns the current key.
 void ksort(long sortFlag)
           
 void natcasesort()
           
 void natsort()
           
 void next(Env env)
          Advances to the next row.
 boolean offsetExists(Value offset)
           
 Value offsetGet(Value offset)
           
 Value offsetSet(Value offset, Value value)
           
 Value offsetUnset(Value offset)
           
 void rewind()
          Rewinds the iterator so it is at the first row.
 void rewindJava(Env env)
           
 void seek(Env env, int index)
          Seeks to the given offset.
 void setFlags(Value flags)
           
 void uasort(Callback func, long sortFlag)
           
 void uksort(Callback func, long sortFlag)
           
 boolean valid()
          Returns true if the iterator currently points to a valid row.
 void varDumpImpl(Env env, Value obj, WriteStream out, int depth, java.util.IdentityHashMap<Value,java.lang.String> valueSet)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STD_PROP_LIST

public static final int STD_PROP_LIST
See Also:
Constant Field Values

ARRAY_AS_PROPS

public static final int ARRAY_AS_PROPS
See Also:
Constant Field Values
Constructor Detail

ArrayIterator

public ArrayIterator()
Method Detail

__construct

public Value __construct(Env env,
                         Value qThis,
                         Value value,
                         int flags)

append

public void append(Value value)

asort

public void asort(ArrayValue array,
                  long sortFlag)

count

public int count()
Specified by:
count in interface Countable

current

public Value current(Env env)
Description copied from interface: Iterator
Returns the current value.

Specified by:
current in interface Iterator

getArrayCopy

public Value getArrayCopy()

getFlags

public int getFlags()

key

public Value key(Env env)
Description copied from interface: Iterator
Returns the current key.

Specified by:
key in interface Iterator

ksort

public void ksort(long sortFlag)

natcasesort

public void natcasesort()

natsort

public void natsort()

next

public void next(Env env)
Description copied from interface: Iterator
Advances to the next row.

Specified by:
next in interface Iterator

offsetExists

public boolean offsetExists(Value offset)
Specified by:
offsetExists in interface ArrayAccess

offsetGet

public Value offsetGet(Value offset)
Specified by:
offsetGet in interface ArrayAccess

offsetSet

public Value offsetSet(Value offset,
                       Value value)
Specified by:
offsetSet in interface ArrayAccess

offsetUnset

public Value offsetUnset(Value offset)
Specified by:
offsetUnset in interface ArrayAccess

rewindJava

public void rewindJava(Env env)

rewind

public void rewind()
Description copied from interface: Iterator
Rewinds the iterator so it is at the first row.

Specified by:
rewind in interface Iterator

setFlags

public void setFlags(Value flags)

seek

public void seek(Env env,
                 int index)
Description copied from interface: SeekableIterator
Seeks to the given offset.

Specified by:
seek in interface SeekableIterator

uasort

public void uasort(Callback func,
                   long sortFlag)

uksort

public void uksort(Callback func,
                   long sortFlag)

valid

public boolean valid()
Description copied from interface: Iterator
Returns true if the iterator currently points to a valid row.

Specified by:
valid in interface Iterator

varDumpImpl

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