コード例 #1
0
ファイル: ServiceContainer.php プロジェクト: novuso/common-l
 /**
  * {@inheritdoc}
  */
 public function get($id)
 {
     if (!isset($this->services[$id])) {
         $message = sprintf('Entry (%s) is not defined', VarPrinter::toString($id));
         throw EntryNotFoundException::create($message);
     }
     return $this->services[$id]($this);
 }
コード例 #2
0
 public function test_that_create_returns_exception_instance()
 {
     $exception = EntryNotFoundException::create('Entry not found');
     $this->assertInstanceOf('Novuso\\Common\\Application\\Container\\Exception\\EntryNotFoundException', $exception);
 }