Ejemplo n.º 1
0
 /**
  * Get the concrete type for a given abstract.
  *
  * @param  string           $abstract
  * @return string|Closure   $concrete
  */
 protected function getConcrete($abstract)
 {
     if (isset($this->bindings[$abstract])) {
         return $this->bindings[$abstract]['concrete'];
     }
     // If we don't have a concrete type for a given abstract, but have a parent,
     // task the parent to get the concrete type:
     if ($this->parent) {
         return $this->parent->getConcrete($abstract);
     }
     // If we don't have a registered resolver or concrete for the type, we'll just
     // assume each type is a concrete name and will attempt to resolve it as is
     // since the container should be able to resolve concretes automatically.
     return $abstract;
 }