コード例 #1
0
ファイル: BasketTest.php プロジェクト: patternseek/ecommerce
 function setup()
 {
     DependencyInjector::init(new Container());
 }
コード例 #2
0
 /**
  *
  */
 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();
     }
 }
コード例 #3
0
 protected function setUp()
 {
     DependencyInjector::init(new Container());
 }