original_string: public function extend($name, Closure $extender) {
  		$name = $this->getAlias($name);
  		$component = &$this->components[$name];
  
  		if (!isset($component['extender'])) {
  			$component['extender'] = [];
  		}
  
  		if ($this->isSingleton($name)) {
  			$component = $this->make($name);
  
  			$component = $this->resolveExtend($name, $component);
  
  			return $this->instance($name, $component);
  		}
  
  		array_push($component['extender'], $extender);
  	}
code: public function extend($name, Closure $extender) {
  		$name = $this->getAlias($name);
  		$component = &$this->components[$name];
  
  		if (!isset($component['extender'])) {
  			$component['extender'] = [];
  		}
  
  		if ($this->isSingleton($name)) {
  			$component = $this->make($name);
  
  			$component = $this->resolveExtend($name, $component);
  
  			return $this->instance($name, $component);
  		}
  
  		array_push($component['extender'], $extender);
  	}
code_tokens: public function extend ( $ name , Closure $ extender ) { $ name = $ this -> getAlias ( $ name ) ; $ component = & $ this -> components [ $ name ] ; if ( ! isset ( $ component [ 'extender' ] ) ) { $ component [ 'extender' ] = [ ] ; } if ( $ this -> isSingleton ( $ name ) ) { $ component = $ this -> make ( $ name ) ; $ component = $ this -> resolveExtend ( $ name , $ component ) ; return $ this -> instance ( $ name , $ component ) ; } array_push ( $ component [ 'extender' ] , $ extender ) ; }
docstring: Extend component.
  If component is singleton, this method will resolve extend and return new instance.
  
  @param  string  $name     Component name
  @param  Closure $extender Component extender
  @return void
docstring_tokens: Extend component . If component is singleton this method will resolve extend and return new instance .