cfinterface

Defines an interface that consists of a set of signatures for functions.
The interface does not include the full function definitions;
instead, you implement the functions in a CFC.
The interfaces that you define by using this tag can make up
the structure of a reusable application framework.

  <cfinterface>

 interface displayname="My Interface" { numeric function myFunction(required string myArgument); }

Attribute Reference

displayName string

A value to be displayed when using introspection to
show a descriptive name for the interface. (optional)

extends string

A comma delimited list of one or more interfaces that this interface extends.
Any CFC that implements an interface must also implement all the functions
in the interfaces specified by this property.
If an interface extends another interface, and the child interface specifies
a function with the same name as one in the parent interface, both functions
must have the same attributes; otherwise ColdFusion generates an error. (optional)

hint string

Text to be displayed when using introspection to show information about the interface.
The hint attribute value follows the syntax line in the function description. (optional)

Examples
Sample code using the cfinterface tag

interface displayname="My Interface" { 
 numeric function myFunction(required string myArgument); 
 }

<cfinterface displayname="My Interface"> 
 <cfunction name="myFunction" returntype="numeric"> 
 <cfargument required="true" type="string" name="myArgument"> 
 </cffunction> 
 </cfinterface>

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub