Skip to main content

Laminas Overview

Sirius uses the Laminas Framework (formerly Zend) for the core of building its various PHP components. You can find out more at the Laminas documentation

It’s useful to know where to look for key elements and how they relate to the whole. All requests broadly follow the same path shown in:

Laminas Application Flow

Nginx (our web server) hands off any non-filesystem web requests to the php runtime running in php-fpm.

These are all handled by index.php, which loads the PHP autoloader and then initialises the Laminas application with the global application configuration file and configuration for all the modules that make up the app.

Modules are used to partition up similar pieces of application logic. Most of the work in Sirius goes on in the Application module, but some areas such as DDC (Document capture handling) and Finance are given their own areas. Modules register themselves with the EventManager to handle application events.

Typically the MVC event lifecycle follows the pattern:

  1. Bootstrap - set up initial configuration and servcies
  2. Route - Identify the correct namespace and appropriate controller
  3. Dispatch - Send the request to the appropriate controller
  4. Render - render any viewx with their data
  5. Finish - Trigger sending the final http response back

There are also Dispatch Error and Render Error events that are fired if either Dispatch or Render fail.

The MVCEvent object is passed around through the lifecycle and contains information on routing, request and repsonse.

This page was last reviewed on 8 November 2021. It needs to be reviewed again on 31 January 2022 by the page owner #opg-sirius-develop .
This page was set to be reviewed before 31 January 2022 by the page owner #opg-sirius-develop. This might mean the content is out of date.