instantiate
The instantiate verb allows you to create an object which has been defined using a CFC. It is used to create the object which is stored in memory and can then be called with the invoke verb. It was introduced in Fusebox 4.1, and has been improved in Fusebox 5.
In fusebox 4.1 you must place any arguments in the <instantiate> tag:
<instantiate class="MyObjectType" object="myObj" arguments="one='arg1string',two=arg2" />
For Fusebox 5 it is possible to use separate <argument> tags with <instantiate>, the following is equivalent the Fusebox 4 version above:
<instantiate class="MyObjectType" object="myObj">
<argument name="one" value="arg1string" />
<argument name="two" value="#arg2#" />
</instantiate>
Note the differences in the way strings and evaluated arguments are specified.
You can also specify positional (unnamed) arguments for <instantiate>:
<instantiate class="MyObjectType" object="myObj" arguments="'arg1string',arg2" />
<!--- Fusebox 5 style instantiation with positional arguments --->
<instantiate class="MyObjectType" object="myObj">
<argument value="arg1string" />
<argument value="#arg2#" />
</instantiate>
You can mix positional arguments and named arguments, although all positional arguments should precede any named arguments, just as in a regular ColdFusion method call using <cfinvokeargument>.
Note that although the Fusebox 4.1 form (arguments on <instantiate>) is not deprecated in Fusebox 5 - it is possible that it may be deprecated in a future release of Fusebox.