GetComponentMetaData() - get metadata for a cfc
GetComponentMetaData.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GetComponentMetaData function example: how to get metadata for a cfc (coldfusion component)</title>
</head>
<body>
<h2 style="color:Crimson">GetComponentMetaData Function Example</h2>
<cfset MyComponentMetaData=GetComponentMetaData("MyComponent")>
<cfdump var="#MyComponentMetaData#" label="MyComponent.cfc MetaData" >
</body>
</html>
MyComponent.cfc
<cfcomponent output="no" Author="Jones" displayname="Math">
<cffunction name="Sum" access="remote" returntype="numeric" description="Sum two numbers">
<cfargument name="Value1" type="numeric" required="yes">
<cfargument name="Value2" type="numeric" required="yes">
<cfset Sum=arguments.value1+arguments.value2>
<cfreturn Sum>
</cffunction>
</cfcomponent>
- IIF()
- CreateObject() - create a coldfusion object (type component)
- DE() - escape any double-quotation marks in the parameter and wraps the result in double-quotation marks
- Evaluate() - evaluate one or more string expressions dynamically from left to right
- SetVariable() - set a variable with name and value