original_string: public function instance($name, $instance) {
  		list($name, $alias) = $this->extractName($name);
  
  		$componentName = $this->getAlias($name);
  
  		if ($this->isSingleton($componentName) && $this->resolved($componentName)) {
  			throw new ComponentRegisterException('Can\'t register component, The ' . $name . ' component is singleton, and it had resolved');
  		}
  
  		if (!is_null($alias)) {
  			$this->alias($alias, $name);
  		}
  
  		$this->instances[$name] = $instance;
  	}
code: public function instance($name, $instance) {
  		list($name, $alias) = $this->extractName($name);
  
  		$componentName = $this->getAlias($name);
  
  		if ($this->isSingleton($componentName) && $this->resolved($componentName)) {
  			throw new ComponentRegisterException('Can\'t register component, The ' . $name . ' component is singleton, and it had resolved');
  		}
  
  		if (!is_null($alias)) {
  			$this->alias($alias, $name);
  		}
  
  		$this->instances[$name] = $instance;
  	}
code_tokens: public function instance ( $ name , $ instance ) { list ( $ name , $ alias ) = $ this -> extractName ( $ name ) ; $ componentName = $ this -> getAlias ( $ name ) ; if ( $ this -> isSingleton ( $ componentName ) && $ this -> resolved ( $ componentName ) ) { throw new ComponentRegisterException ( 'Can\'t register component, The ' . $ name . ' component is singleton, and it had resolved' ) ; } if ( ! is_null ( $ alias ) ) { $ this -> alias ( $ alias , $ name ) ; } $ this -> instances [ $ name ] = $ instance ; }
docstring: Register component instance
  @param  string|array $name     Component name
  @param  mixed $instance        Component instance
  @return void
docstring_tokens: Register component instance