public class Function extends AbstractFunction
| Modifier and Type | Field and Description |
|---|---|
protected Arg[] |
_args |
protected Arg[] |
_closureUseArgs |
protected java.lang.String |
_comment |
protected boolean |
_hasReturn |
protected FunctionInfo |
_info |
protected boolean |
_isReturnsReference |
protected java.lang.String |
_name |
protected Statement |
_statement |
_bindingClass, _declaringClassName, _isClosure, _isConstructor, _isFinal, _isStatic, _isTraitMethod, _parseIndex, _visibility, NULL_ARGSNULL_VALUE_ARRAY| Constructor and Description |
|---|
Function(ExprFactory exprFactory,
Location location,
java.lang.String name,
FunctionInfo info,
Arg[] args,
Statement[] statements) |
| Modifier and Type | Method and Description |
|---|---|
Value |
call(Env env,
Expr[] args) |
Value |
call(Env env,
Value[] args)
Evaluates the function.
|
Value |
callClosure(Env env,
Value[] args,
Value[] useArgs)
Evaluates the function as a closure.
|
Value |
callCopy(Env env,
Expr[] args) |
Value |
callCopy(Env env,
Value[] args)
Evaluates the function, returning a copy
|
Value |
callImpl(Env env,
Value[] args,
boolean isRef,
Arg[] useParams,
Value[] useArgs) |
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis,
Value[] args)
Evaluates the method call.
|
Value |
callMethodRef(Env env,
QuercusClass qClass,
Value qThis,
Value[] args)
Evaluates the method call, returning a reference.
|
Value |
callRef(Env env,
Expr[] args) |
Value |
callRef(Env env,
Value[] args)
Evaluates the function, returning a reference.
|
Value[] |
evalArguments(Env env,
Expr fun,
Expr[] args)
Evaluates a function's argument, handling ref vs non-ref
|
Value |
execute(Env env) |
Arg[] |
getArgs(Env env)
Returns the args.
|
Arg[] |
getClosureUseArgs()
Returns the args.
|
java.lang.String |
getComment()
Returns the documentation for this function.
|
ClassDef |
getDeclaringClass()
Returns the declaring class
|
java.lang.String |
getDeclaringClassName()
Returns the declaring class name
|
FunctionInfo |
getInfo() |
java.lang.String |
getName()
Returns the name.
|
protected boolean |
isMethod() |
boolean |
isObjectMethod() |
boolean |
isReturnsReference(Env env)
True for a returns reference.
|
void |
setClosureUseArgs(Arg[] useArgs)
Returns the args.
|
void |
setComment(java.lang.String comment)
Sets the documentation for this function.
|
java.lang.String |
toString() |
call, call, call, call, call, call, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callNew, callRef, callRef, callRef, callRef, callRef, callRef, errorPrivateAccess, errorProtectedAccess, getActualFunction, getBindingClass, getBindingClassName, getCallbackName, getCompilationName, getDeclComment, getDeclEndLine, getDeclFileName, getDeclStartLine, getLocation, getType, isAbstract, isBoolean, isCallable, isCallUsesSymbolTable, isCallUsesVariableArgs, isClosure, isConstructor, isDouble, isFinal, isGlobal, isInternal, isJavaMethod, isLong, isObject, isPrivate, isProtected, isPublic, isStatic, isString, isTraitMethod, isValid, setBindingClass, setClosure, setConstructor, setDeclaringClassName, setFinal, setGlobal, setParseIndex, setStatic, setTraitMethod, setVisibility, toFuncallArray, callArray, callArray, toCallableabs, add, add, addOne, append, appendTo, appendTo, appendTo, appendTo, bitAnd, bitOr, bitXor, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, charValueAt, checkPrivate, checkProtected, clone, cmp, containsKey, copy, copy, copy, copyArrayItem, copyReturn, copySaveFunArg, copyStringBuilder, copyTree, current, div, div, end, eq, eql, eqValue, findFunction, findQuercusClass, generate, geq, get, get, getArg, getArgTail, getArray, getArray, getBaseIterator, getCallableName, getCalledClass, getClassName, getCount, getCountRecursive, getDirty, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getHashCode, getIterator, getKeyArray, getKeyIterator, getObject, getObject, getObjectHash, getQuercusClass, getRef, getResourceType, getSize, getStaticFieldValue, getStaticFieldVar, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, getValueArray, getValueIterator, getValueType, getVar, gt, hasCurrent, hashCode, increment, initField, initField, initField, initIncompleteField, isA, isA, isArray, isBinary, isDefault, isDoubleConvertible, isEmpty, isEmpty, isFieldExists, isFieldInit, isLongConvertible, isNull, isNumberConvertible, isNumeric, isResource, isset, isset, issetField, issetThisField, isUnicode, isVar, jsonEncode, key, keyExists, length, leq, lshift, lt, mod, mul, mul, neg, next, nextIndex, pop, pos, postdecr, postincr, postincr, predecr, preincr, preincr, prev, print, print, printDepth, printJavaChar, printJavaString, printR, printRImpl, put, put, put, putArray, putField, putField, putField, putObject, putThisField, putThisField, putThisFieldArray, putVar, remove, reset, rshift, serialize, serialize, set, setCharValueAt, setFieldInit, setJavaObject, setStaticFieldRef, shuffle, sub_rev, sub, sub, subOne, toArgRef, toArray, toArrayValue, toAutoArray, toAutoObject, toBigDecimal, toBigInteger, toBinaryValue, toBinaryValue, toBinaryValue, toBinaryValueMarshalCost, toBoolean, toBooleanMarshalCost, toByteArrayMarshalCost, toByteMarshalCost, toChar, toCharArrayMarshalCost, toCharMarshalCost, toDebugString, toDouble, toDouble, toDouble, toDouble, toDouble, toDoubleMarshalCost, toDoubleValue, toException, toFloatMarshalCost, toInputStream, toInt, toIntegerMarshalCost, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaEnum, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toKey, toLocalRef, toLocalThis, toLocalValue, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, toLong, toLong, toLong, toLong, toLong, toLongMarshalCost, toLongValue, toObject, toRef, toRefValue, toShortMarshalCost, toString, toStringBuilder, toStringBuilder, toStringBuilder, toStringBuilder, toStringMarshalCost, toStringValue, toStringValue, toStringValueMarshalCost, toUnicode, toUnicodeValue, toUnicodeValue, toUnicodeValueMarshalCost, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, unsetThisPrivateField, valuesToArray, varDump, varDumpImpl, varExport, varExportImplprotected final FunctionInfo _info
protected final boolean _isReturnsReference
protected final java.lang.String _name
protected final Arg[] _args
protected final Statement _statement
protected boolean _hasReturn
protected java.lang.String _comment
protected Arg[] _closureUseArgs
public Function(ExprFactory exprFactory, Location location, java.lang.String name, FunctionInfo info, Arg[] args, Statement[] statements)
public java.lang.String getName()
getName in class AbstractFunctionpublic ClassDef getDeclaringClass()
getDeclaringClass in class AbstractFunctionpublic FunctionInfo getInfo()
protected boolean isMethod()
public java.lang.String getDeclaringClassName()
getDeclaringClassName in class AbstractFunctionpublic Arg[] getArgs(Env env)
getArgs in interface CallablegetArgs in class AbstractFunctionpublic Arg[] getClosureUseArgs()
getClosureUseArgs in class AbstractFunctionpublic void setClosureUseArgs(Arg[] useArgs)
setClosureUseArgs in class AbstractFunctionpublic boolean isObjectMethod()
public boolean isReturnsReference(Env env)
isReturnsReference in interface CallableisReturnsReference in class AbstractFunctionpublic void setComment(java.lang.String comment)
public java.lang.String getComment()
getComment in class AbstractFunctionpublic Value[] evalArguments(Env env, Expr fun, Expr[] args)
evalArguments in class AbstractFunctionargs - the user's argumentspublic Value call(Env env, Value[] args)
AbstractFunctioncall in interface Callablecall in class AbstractFunctionenv - the calling environmentpublic Value callCopy(Env env, Value[] args)
AbstractFunctioncallCopy in class AbstractFunctionpublic Value callRef(Env env, Value[] args)
AbstractFunctioncallRef in class AbstractFunctionpublic Value callClosure(Env env, Value[] args, Value[] useArgs)
AbstractFunctioncallClosure in class AbstractFunctionpublic Value callImpl(Env env, Value[] args, boolean isRef, Arg[] useParams, Value[] useArgs)
public Value callMethod(Env env, QuercusClass qClass, Value qThis, Value[] args)
AbstractFunctioncallMethod in class AbstractFunctionpublic Value callMethodRef(Env env, QuercusClass qClass, Value qThis, Value[] args)
AbstractFunctioncallMethodRef in class AbstractFunctionpublic java.lang.String toString()
toString in class AbstractFunction