Tutorials: Configuring Your Application

Getting Application Information

Framework collects your site information based on XML files content into Application objects: Lucinda\MVC\STDOUT\Application (encapsulating data in stdout.xml) and Lucinda\MVC\STDERR\Application (encapsulating data in stderr.xml).

Both classes were done with symmetry in mind (for shared logic, methods have same signature) and available for querying in STDOUT/STDERR controllers and event listeners. Following shared methods are most useful to developers:

Setting Application Information

Everything collected by Application objects is constant by default. In event listeners, however, developers are able to add dynamic information via attributes. This feature is thus only available for Lucinda\MVC\STDOUT\Application using methods:

Framework sets following Lucinda\MVC\STDOUT\Application attributes already:

Writing Event Listeners

Same as JavaScript allows you to hook logic on DOM events, so does framework allow developers to define events that will be executed on points in application's lifecycle in the order they are set as <listener> in <listeners> tag @ stdout.xml:

By default, all user defined event listeners must be classes in application/listeners folder. For real life examples of each event type, check event listeners set by framework for APIs integration!


Share