cphalcon
cphalcon copied to clipboard
[NFR]\Phalcon\DI implements Traversable
\Phalcon\DI is a very powefull thing and can be used in different ways. So one of that is simple collection with named items. But there no way to Traverse all DI container. Please consider this as Feature Request.
Maybe I did not understand what you mean, my English is not good.
$services = $this->getDI()->getServices();
foreach($services as $s) {
}
I agree. It is even more convenient.