I have a strange error.
The code var_dump(array_keys($this->di->getServices()));
prints array(22) { ... [5]=> string(8) "response" ... }
The code var_dump($this->di->getServices()['response']);
prints object(Phalcon\DI\Service)#22 (4) { ["_name":protected]=> string(8) "response" ["_definition":protected]=> string(21) "Phalcon\Http\Response" ["_shared":protected]=> bool(true) ["_sharedInstance":protected]=> NULL }
But code $this->di->get('response'); Throws an error A dependency injection object is required to access the 'response' service
What can be wrong?