Created
January 25, 2014 16:13
-
-
Save nastanford/8618740 to your computer and use it in GitHub Desktop.
CFArtGalleryCB - Coldbox.cfc file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent output="false" hint="My App Configuration"> | |
<cfscript> | |
/** | |
structures/arrays to create for configuration | |
- coldbox (struct) | |
- settings (struct) | |
- conventions (struct) | |
- environments (struct) | |
- ioc (struct) | |
- models (struct) | |
- debugger (struct) | |
- mailSettings (struct) | |
- i18n (struct) | |
- bugTracers (struct) | |
- webservices (struct) | |
- datasources (struct) | |
- layoutSettings (struct) | |
- layouts (array of structs) | |
- cacheBox (struct) | |
- interceptorSettings (struct) | |
- interceptors (array of structs) | |
- modules (struct) | |
- logBox (struct) | |
Available objects in variable scope | |
- controller | |
- logBoxConfig | |
- appMapping (auto calculated by ColdBox) | |
Required Methods | |
- configure() : The method ColdBox calls to configure the application. | |
Optional Methods | |
- detectEnvironment() : If declared the framework will call it and it must return the name of the environment you are on. | |
- {environment}() : The name of the environment found and called by the framework. | |
*/ | |
// Configure ColdBox Application | |
function configure(){ | |
// coldbox directives | |
coldbox = { | |
//Application Setup | |
appName = "CFArtGalleryCB", | |
eventName = "event", | |
//Development Settings | |
debugMode = true, | |
debugPassword = "", | |
reinitPassword = "", | |
handlersIndexAutoReload = true, | |
configAutoReload = false, | |
//Implicit Events | |
defaultEvent = "General.index", | |
requestStartHandler = "main.onRequestStart", | |
requestEndHandler = "main.onRequestEnd", | |
applicationStartHandler = "main.onAppInit", | |
applicationEndHandler = "", | |
sessionStartHandler = "main.onSessionStart", | |
sessionEndHandler = "main.onSessionStart", | |
missingTemplateHandler = "", | |
//Extension Points | |
UDFLibraryFile = "includes/helpers/ApplicationHelper.cfm", | |
coldboxExtensionsLocation = "", | |
modulesExternalLocation = [], | |
pluginsExternalLocation = "", | |
viewsExternalLocation = "", | |
layoutsExternalLocation = "", | |
handlersExternalLocation = "", | |
requestContextDecorator = "", | |
//Error/Exception Handling | |
exceptionHandler = "", | |
onInvalidEvent = "", | |
customErrorTemplate = "", | |
//Application Aspects | |
handlerCaching = false, | |
eventCaching = false, | |
proxyReturnCollection = false, | |
flashURLPersistScope = "session" | |
}; | |
// custom settings | |
settings = { | |
}; | |
// environment settings, create a detectEnvironment() method to detect it yourself. | |
// create a function with the name of the environment so it can be executed if that environment is detected | |
// the value of the environment is a list of regex patterns to match the cgi.http_host. | |
environments = { | |
//development = "^cf8.,^railo." | |
}; | |
// Module Directives | |
modules = { | |
//Turn to false in production | |
autoReload = true, | |
// An array of modules names to load, empty means all of them | |
include = [], | |
// An array of modules names to NOT load, empty means none | |
exclude = [] | |
}; | |
//LogBox DSL | |
logBox = { | |
// Define Appenders | |
appenders = { | |
coldboxTracer = { class="coldbox.system.logging.appenders.ColdboxTracerAppender" } | |
}, | |
// Root Logger | |
root = { levelmax="INFO", appenders="*" }, | |
// Implicit Level Categories | |
info = [ "coldbox.system" ] | |
}; | |
//Layout Settings | |
layoutSettings = { | |
defaultLayout = "main.cfm", | |
defaultView = "" | |
}; | |
//Interceptor Settings | |
interceptorSettings = { | |
throwOnInvalidStates = false, | |
customInterceptionPoints = "" | |
}; | |
//Register interceptors as an array, we need order | |
interceptors = [ | |
//Autowire | |
{class="coldbox.system.interceptors.Autowire", | |
properties={} | |
}, | |
//SES | |
{class="coldbox.system.interceptors.SES", | |
properties={} | |
} | |
]; | |
//Datasources | |
datasources = { | |
mysite = {name="cfartgallery"} | |
}; | |
/* | |
//Register Layouts | |
layouts = [ | |
{ name = "login", | |
file = "Layout.tester.cfm", | |
views = "vwLogin,test", | |
folders = "tags,pdf/single" | |
} | |
]; | |
//Model Integration | |
models = { | |
objectCaching = true, | |
definitionFile = "config/modelMappings.cfm", | |
externalLocation = "coldbox.testing.testmodel", | |
SetterInjection = false, | |
DICompleteUDF = "onDIComplete", | |
StopRecursion = "", | |
parentFactory = { | |
framework = "coldspring", | |
definitionFile = "config/parent.xml.cfm" | |
} | |
}; | |
//Conventions | |
conventions = { | |
handlersLocation = "handlers", | |
pluginsLocation = "plugins", | |
viewsLocation = "views", | |
layoutsLocation = "layouts", | |
modelsLocation = "model", | |
modulesExternalLocation = "", | |
eventAction = "index" | |
}; | |
//IOC Integration | |
ioc = { | |
framework = "lightwire", | |
reload = true, | |
objectCaching = false, | |
definitionFile = "config/coldspring.xml.cfm", | |
parentFactory = { | |
framework = "coldspring", | |
definitionFile = "config/parent.xml.cfm" | |
} | |
}; | |
//Debugger Settings | |
debugger = { | |
enableDumpVar = false, | |
persistentRequestProfilers = true, | |
maxPersistentRequestProfilers = 10, | |
maxRCPanelQueryRows = 50, | |
//Panels | |
showTracerPanel = true, | |
expandedTracerPanel = true, | |
showInfoPanel = true, | |
expandedInfoPanel = true, | |
showCachePanel = true, | |
expandedCachePanel = true, | |
showRCPanel = true, | |
expandedRCPanel = true, | |
showModulesPanel = true, | |
expandedModulesPanel = false | |
}; | |
//Mailsettings | |
mailSettings = { | |
server = "", | |
username = "", | |
password = "", | |
port = 25 | |
}; | |
//i18n & Localization | |
i18n = { | |
defaultResourceBundle = "includes/i18n/main", | |
defaultLocale = "en_US", | |
localeStorage = "session", | |
unknownTranslation = "**NOT FOUND**" | |
}; | |
//bug tracers | |
bugTracers = { | |
enabled = false, | |
bugEmails = "", | |
mailFrom = "", | |
customEmailBugReport = "" | |
}; | |
//webservices | |
webservices = { | |
testWS = "http://www.test.com/test.cfc?wsdl", | |
AnotherTestWS = "http://www.coldbox.org/distribution/updatews.cfc?wsdl" | |
}; | |
//Datasources | |
datasources = { | |
mysite = {name="mySite", dbType="mysql", username="root", password="pass"}, | |
blog_dsn = {name="myBlog", dbType="oracle", username="root", password="pass"} | |
}; | |
*/ | |
} | |
</cfscript> | |
</cfcomponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment