com.caucho.quercus.statement
Class ForeachStatement

java.lang.Object
  extended by com.caucho.quercus.statement.Statement
      extended by com.caucho.quercus.statement.ForeachStatement
Direct Known Subclasses:
ProForeachStatement

public class ForeachStatement
extends Statement

Represents a foreach statement.


Field Summary
protected  Statement _block
           
protected  boolean _isRef
           
protected  AbstractVarExpr _key
           
protected  java.lang.String _label
           
protected  Expr _objExpr
           
protected  AbstractVarExpr _value
           
 
Fields inherited from class com.caucho.quercus.statement.Statement
BREAK_FALL_THROUGH, FALL_THROUGH, RETURN
 
Constructor Summary
ForeachStatement(Location location, Expr objExpr, AbstractVarExpr key, AbstractVarExpr value, boolean isRef, Statement block, java.lang.String label)
           
 
Method Summary
 Value execute(Env env)
           
 boolean isLoop()
           
 
Methods inherited from class com.caucho.quercus.statement.Statement
fallThrough, getLocation, getParent, rethrow, rethrow, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_objExpr

protected final Expr _objExpr

_key

protected final AbstractVarExpr _key

_value

protected final AbstractVarExpr _value

_isRef

protected final boolean _isRef

_block

protected final Statement _block

_label

protected final java.lang.String _label
Constructor Detail

ForeachStatement

public ForeachStatement(Location location,
                        Expr objExpr,
                        AbstractVarExpr key,
                        AbstractVarExpr value,
                        boolean isRef,
                        Statement block,
                        java.lang.String label)
Method Detail

isLoop

public boolean isLoop()
Overrides:
isLoop in class Statement

execute

public Value execute(Env env)
Specified by:
execute in class Statement