function setup() { DependencyInjector::init(new Container()); }
/** * */ private function handleDependencyInjection() { // It's a little strange that the object injects its own // dependencies but it means that callers don't need to do // it manually and you still get the advantage that the deps // are specified in the optional injectDependencies() method's // signature $this->log("Dependency injection...", LogLevel::DEBUG); DependencyInjector::instance()->injectIntoMethod($this); foreach ($this->childComponents as $child) { $child->handleDependencyInjection(); } }
protected function setUp() { DependencyInjector::init(new Container()); }