예제 #1
0
파일: Container.php 프로젝트: no22/gongo
 public function instance($name, $eager = null)
 {
     list($component, $dependency, $lazy) = $this->services[$name];
     $args = array();
     foreach ($dependency as $service) {
         $args[] = $this->instance($service, $eager);
     }
     if (!is_null($eager)) {
         return $eager ? Gongo_Locator::make($component, $args) : Gongo_Locator::makeLazy($component, $args);
     }
     return $lazy ? Gongo_Locator::makeLazy($component, $args) : Gongo_Locator::make($component, $args);
 }