original_string: public function single($alias)
  	{
  		$alias = strtolower($alias);
  
  		// Return the existing object if it exists.
  		if (! empty($this->instances[$alias]) && is_object($this->instances[$alias]))
  		{
  			return $this->instances[$alias];
  		}
  
  		// Die if we don't know what class to use.
  		if (empty($this->services[$alias]))
  		{
  			throw new \InvalidArgumentException('Unable to find class with alias: '. $alias);
  		}
  
  		$instance = $this->make($alias, true);
  
  		$this->instances[$alias] =& $instance;
  
  		return $this->instances[$alias];
  	}
code: public function single($alias)
  	{
  		$alias = strtolower($alias);
  
  		// Return the existing object if it exists.
  		if (! empty($this->instances[$alias]) && is_object($this->instances[$alias]))
  		{
  			return $this->instances[$alias];
  		}
  
  		// Die if we don't know what class to use.
  		if (empty($this->services[$alias]))
  		{
  			throw new \InvalidArgumentException('Unable to find class with alias: '. $alias);
  		}
  
  		$instance = $this->make($alias, true);
  
  		$this->instances[$alias] =& $instance;
  
  		return $this->instances[$alias];
  	}
code_tokens: public function single ( $ alias ) { $ alias = strtolower ( $ alias ) ; // Return the existing object if it exists. if ( ! empty ( $ this -> instances [ $ alias ] ) && is_object ( $ this -> instances [ $ alias ] ) ) { return $ this -> instances [ $ alias ] ; } // Die if we don't know what class to use. if ( empty ( $ this -> services [ $ alias ] ) ) { throw new \ InvalidArgumentException ( 'Unable to find class with alias: ' . $ alias ) ; } $ instance = $ this -> make ( $ alias , true ) ; $ this -> instances [ $ alias ] = & $ instance ; return $ this -> instances [ $ alias ] ; }
docstring: Allows you to create a new instance of an object as a singleton,
  passing in arguments.
  
  @param $alias
  @return mixed
docstring_tokens: Allows you to create a new instance of an object as a singleton passing in arguments .