com.caucho.quercus.expr
Class ClosureExpr

java.lang.Object
  extended by com.caucho.quercus.expr.Expr
      extended by com.caucho.quercus.expr.ClosureExpr
Direct Known Subclasses:
ClosureExprPro

public class ClosureExpr
extends Expr

Represents a PHP closure expression.


Field Summary
protected  Function _fun
           
 
Fields inherited from class com.caucho.quercus.expr.Expr
COMPILE_ARG_MAX
 
Constructor Summary
ClosureExpr(Location location, Function fun)
           
 
Method Summary
 Expr createCopy(ExprFactory factory)
          Returns the copy of the value.
 Expr createRef(QuercusParser parser)
          Returns the reference of the value.
 Value eval(Env env)
          Evaluates the expression.
 Value evalCopy(Env env)
          Evaluates the expression.
 Function getFunction()
          Returns the function
 java.lang.String getFunctionLocation()
          Returns the location if known.
 java.lang.String getName()
          Returns the name.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.quercus.expr.Expr
assign, canRead, createAssign, createAssignFrom, createAssignRef, createCall, createClassConst, createClassField, createClassField, createDeref, createFieldGet, createFieldGet, createIsset, createUnset, evalArg, evalArgs, evalArray, evalArrayAssign, evalAssignRef, evalAssignValue, evalBoolean, evalChar, evalConstant, evalConstantPrefix, evalConstantSuffix, evalDirty, evalDouble, evalIsset, evalLong, evalObject, evalPostIncrement, evalPreIncrement, evalRef, evalString, evalStringValue, evalTop, evalUnsetArray, evalValue, evalVar, getFileName, getLine, getLocation, getLocationLine, isArray, isAssign, isBoolean, isConstant, isDouble, isFalse, isLiteral, isLong, isNumber, isRef, isString, isTrue, isVar, print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_fun

protected final Function _fun
Constructor Detail

ClosureExpr

public ClosureExpr(Location location,
                   Function fun)
Method Detail

getName

public java.lang.String getName()
Returns the name.


getFunction

public Function getFunction()
Returns the function


getFunctionLocation

public java.lang.String getFunctionLocation()
Returns the location if known.

Overrides:
getFunctionLocation in class Expr

createRef

public Expr createRef(QuercusParser parser)
Returns the reference of the value.

Overrides:
createRef in class Expr
Parameters:
location -

createCopy

public Expr createCopy(ExprFactory factory)
Returns the copy of the value.

Overrides:
createCopy in class Expr
Parameters:
location -

eval

public Value eval(Env env)
Evaluates the expression.

Specified by:
eval in class Expr
Parameters:
env - the calling environment.
Returns:
the expression value.

evalCopy

public Value evalCopy(Env env)
Evaluates the expression.

Overrides:
evalCopy in class Expr
Parameters:
env - the calling environment.
Returns:
the expression value.

toString

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