This post refers to DotKernel 1, based on Zend Framework 1.
If you are looking for DotKernel 3 related posts, go here.

In DotKernel, Zend_Registry will contain the following variables:

  • startTime – the result of microtime() at the beginning of the request
  • configuration – the configuration options loaded from configs/application.ini
  • router – routing settings loaded from configs/router.xml
  • database – the database adapter
  • settings – the settings loaded from the database
  • requestModule, requestController, requestAction – the module, controller and action of the current request
  • request – additional request variables
  • seo – seo information loaded from configs/dots/seo.xml (site name, default description, keywords etc)
  • option – the options for the current dot loaded from configs/dots/<moduleName>.xml
  • session – the session object

To use the variables in the registry, you must first get an instance of the registry object:

$registry = Zend_Registry::getInstance();
//...
echo $registry->startTime;
//...
echo $registry->requestAction;

Or if you only need one variable from the registry, you can get it directly using:

$action = Zend_Registry::get('requestAction');

You can find more information about Zend_Registry, in the Zend Framework Documentation.


Looking for PHP, Laminas or Mezzio Support?

As part of the Laminas Commercial Vendor Program, Apidemia offers expert technical support and services for:

  • Modernising Legacy Applications
  • Migration from any version of Zend Framework to Laminas
  • Migration from legacy Laminas API Tools (formerly Apigility) to Dotkernel API
  • Mezzio and Laminas Consulting and Technical Audit
  • One Comment

    1. DotKernel 1.5.0 Released | DotKernel PHP Application Framework

      […] We’ve changed the structure of the registry, for more about this, please check this blog post. […]

    Leave a Reply to DotKernel 1.5.0 Released | DotKernel PHP Application Framework Cancel Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>