Engine methods
attendCliRequest
Attends the request received from the CLI interface.
attendWebRequest
Attends the request received from a web server by calling Actions::run with the requested URI string
callMethodOnAllModules( methodName )
Calls the specified static method on all the available Core and App modules where it's implemented, and then loads those modules.
methodNameThe method name to call
end
Ends the application by calling the end methods of all the loaded modules.
getStatus
Returns information about the engine and its current status, including the loaded modules, the mapped actions and some benchmarks.
Note that some information on the return array will be missing if the
isDeveloption has not been activated when initializing the engine. This also applies to the getStatusHumanReadable and getStatusHtml methods.
Returns: A hash array with the information
getStatusHumanReadable
Returns a human-readable version of the status information provided by the getStatus method.
Returns: A hash array with the status information in a human readable format
getStatusHtml
Returns an HTML version of the status in a human readable format.
Returns: The HTML code
init( appNamespace, setup )
Initializes the Cherrycake engine.
appNamespaceThe app namespacesetupOptional hash arrayappNameThe app nameisDevelSet it to true if the app is running in a development environmentisUnderMaintenanceWhether the App is under maintenance or notisCliWhether the engine is running as a cli or not. When not specified, it will autodetect.configDirThe directory where configuration files are storedappModulesDirThe directory where app modules are storedappClassesDirThe directory where app classes are storedtimezoneNameThe system's timezone. All modules, including Database for date/time retrievals/saves will be made taking this timezone into account. The server is expected to run on this timezone. Default:Etc/UTCtimezoneIdThe system's timezone. The same astimezoneName, but the matching id on the Cherrycake timezones database table. Default:532(532 is the id for the Etc/UTC time zone)baseCoreModulesAn ordered array of the base Core module names that has to be always loaded on application start. Defaults to ["Actions"]. This list should include the Actions module to provide some kind of functionality to the app, since otherwise it wouldn't be answering any requests and will be completely unusable, except if you're experimenting with different ways of using the Cherrycake engine. See Working with Actions.baseAppModulesAn ordered array of the base App module names that has to be always loaded on application start.additionalAppConfigFilesAn ordered array of any additional App config file names to load from the App config directory.
Returns: Boolean indicating whether all the modules have been loaded ok or not.
loadAppModule( moduleName, requiredByModuleName )
Loads an App module.
moduleNameThe name of the module.requiredByModuleNameOptional name of the module that required to load the module.
loadCoreModule( moduleName, requiredByModuleName )
Loads a Core module.
moduleNameThe name of the module.requiredByModuleNameOptional name of the module that required to load the module.
Last updated
Was this helpful?