CFARGUMENT | |
Description
Creates a parameter definition within a component definition. Defines a function argument. Used within a cffunction tag. |
|
Category
Extensibility tags | |
Syntax<cfargument name="..." type="..." required="..." default="..." ...> | |
See also
cfcomponent, cffunction, cfinvoke, cfinvokeargument, cfobject, cfproperty, cfreturn
|
|
Usage
This tag must be positioned before any other tags within the cffunction tag. Arguments that are passed when a method is invoked can be accessed from the method body in the following ways:
|
NAME | |
Required | |
String; an argument name. |
TYPE | |
Optional | |
Default value: "any"
String; a type name; data type of the argument.
If the value is not a recognized type, ColdFusion processes it as a component name. |
REQUIRED | |
Optional | |
Default value: "no"
Whether the parameter is required in order to execute the component method.
|
DEFAULT | |
Optional | |
A type; if no argument is passed, specifies a default argument value. If this attribute is present, the required attribute must be set to "no" or not specified. |