PHP Classes

File: manuscript/

Recommend this page to a friend!
  Classes of Gjero Krsteski  >  PIMF  >  manuscript/  >  Download  
File: manuscript/
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: PIMF
Framework for Web application development
Author: By
Last change:
Date: 2 years ago
Size: 1,275 bytes


Class file image Download


A well-known object that other objects can use to find common objects and services. Acts also as a dependency injection container. Note that storing resources in a registry is not permitted!

Common access

 $registry = new Pimf\Registry();
 $registry->your_key = "123";

Static access

 Pimf\Registry::set('your_key', "123")

Following objects are directly accessible and come out of the box:

conf represents the configuration list.

 $conf = Pimf\Registry::get('conf')

env represents Pimf\Environment object which delivers methods for server and execution environment information.

 $env = Pimf\Registry::get('env')

logger represents Pimf\Logger object which delivers methods for common logging options into a file.

 $logger = Pimf\Registry::get('logger')

em represents Pimf\EntityManager object which delivers methods for data persistence and object relational mapping.

 $em = Pimf\Registry::get('em')