original_string: public static function addInstance($className, $instance) {
  		self::checkInstanceClassName($className, $instance);
  
  		if ($instance instanceof t3lib_Singleton) {
  			throw new InvalidArgumentException(
  				'$instance must not be an instance of t3lib_Singleton. ' .
  					'For setting singletons, please use setSingletonInstance.',
  				1288969325
  			);
  		}
  
  		if (!isset(self::$nonSingletonInstances[$className])) {
  			self::$nonSingletonInstances[$className] = array();
  		}
  		self::$nonSingletonInstances[$className][] = $instance;
  	}
code: public static function addInstance($className, $instance) {
  		self::checkInstanceClassName($className, $instance);
  
  		if ($instance instanceof t3lib_Singleton) {
  			throw new InvalidArgumentException(
  				'$instance must not be an instance of t3lib_Singleton. ' .
  					'For setting singletons, please use setSingletonInstance.',
  				1288969325
  			);
  		}
  
  		if (!isset(self::$nonSingletonInstances[$className])) {
  			self::$nonSingletonInstances[$className] = array();
  		}
  		self::$nonSingletonInstances[$className][] = $instance;
  	}
code_tokens: public static function addInstance ( $ className , $ instance ) { self :: checkInstanceClassName ( $ className , $ instance ) ; if ( $ instance instanceof t3lib_Singleton ) { throw new InvalidArgumentException ( '$instance must not be an instance of t3lib_Singleton. ' . 'For setting singletons, please use setSingletonInstance.' , 1288969325 ) ; } if ( ! isset ( self :: $ nonSingletonInstances [ $ className ] ) ) { self :: $ nonSingletonInstances [ $ className ] = array ( ) ; } self :: $ nonSingletonInstances [ $ className ] [ ] = $ instance ; }
docstring: Sets the instance of a non-singleton class to be returned by makeInstance.
  
  If this function is called multiple times for the same $className,
  makeInstance will return the instances in the order in which they have
  been added (FIFO).
  
  Warning: This is a helper method for unit tests. Do not call this directly in production code!
  
  @see makeInstance
  @throws InvalidArgumentException if class extends t3lib_Singleton
  @param string $className
  the name of the class to set, must not be empty
  @param object $instance
  the instance to set, must be an instance of $className
  @return void
docstring_tokens: Sets the instance of a non - singleton class to be returned by makeInstance .