|Classes of Gjero Krsteski||>||PIMF||>||manuscript/6j.-Registry.md||>||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!
$registry = new Pimf\Registry(); $registry->your_key = "123";
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.
$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')