if i have something like this in my front controller:

$registry = new \Phalcon\Registry(); $registry->body = filegetcontents('php://input');

how can i use $registry all over my application ?

edited Mar '14

You have to register Registry in DI container

 $di->set('registry', function(){
  return new Phalcon\Registry();
 }, true);

then you can use it everywhere

 $this->registry->testKey = "testValue";


What is the point of using registry pattern via pretty similar DI pattern? Isn't it better to implement registry as classic singleton?