예제 #1
0
파일: Singleton.php 프로젝트: brick/di
 /**
  * {@inheritdoc}
  */
 public function get(Definition $definition, Container $container)
 {
     if (!$this->resolved) {
         $this->result = $definition->resolve($container);
         $this->resolved = true;
     }
     return $this->result;
 }
예제 #2
0
파일: Prototype.php 프로젝트: brick/di
 /**
  * {@inheritdoc}
  */
 public function get(Definition $definition, Container $container)
 {
     return $definition->resolve($container);
 }