Exemplo n.º 1
0
 /**
  * Allow rebinding on these classes. Normally the injection
  * binding decorator is a one time deal.
  *
  * {@inheritDoc}
  */
 public function bind($name, $object)
 {
     $obj = new InjectionBindingDecorator($this);
     return $obj->bind($name, $object);
 }
Exemplo n.º 2
0
 /**
  * Temporarily bind a dependency. Calls $this->register with $temp as TRUE
  *
  * @param string      $name   The name of the dependency in the form
  *                            Vendor:Namespace
  * @param Closure|obj $object The object to use
  * @return self Returns this InjectionContainer object
  */
 public function bind($name, $object)
 {
     $binding_isolation = new InjectionBindingDecorator($this);
     $binding_isolation->bind($name, $object);
     return $binding_isolation;
 }