-
Notifications
You must be signed in to change notification settings - Fork 1
Using the Framework
CoreConX is designed to be used as a standalone CFC of useful methods and properties or to be a base for your own Application.cfc to build from.
To use the framework as a CFC (as our Testbox tests do), simply drop the contents of the dist folder into your application and instantiate it like you would any CFC.
<cfscript>
coreconx = coreconx.framework();
</cfscript>
To base your Application on top of the CoreConX framework (as our example site does), simply drop the contents of the dist folder into your application and create an Application.cfc that extends the framework.
component extends='coreconx.framework' {
this.name = 'your-application-name';
}
Extending the framework has the added benefit of exposing several useful shortcut methods that you can use without calling the CoreConX CFC directly. These methods are documented in their respective sections of the Wiki.
CoreConX offers getters and setters for its various functionality, but you can also call a single method to configure everything in one fell swoop. This is the configure()
method.
It takes one argument:
- struct configuration = {}
You can run this method on the CFC:
<cfscript>
coreconx.configure({
translator = 'com.translator'
});
</cfscript>
You can also use it in your Application.cfc:
component extends='coreconx.framework' {
this.name = 'your-application-name';
configure({
translator = 'com.translator'
});
}