PHP Classes

File: manuscript/

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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: 10 months ago
Size: 1,275 bytes



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

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

Static access

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

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

conf represents the configuration list.

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

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

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

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

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

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

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