original_string: public static function getSingletonInstance($className, array $arguments = array())
      {	
      	
      	$registerKey = $className;
      
          if (!isset(self::$_registry[$registerKey])) {
  
          	if(class_exists($className)) {
              	self::$_registry[$registerKey] = new $className($arguments);
              	
          	}else {
   
          		throw new Exception ('Invalid class name:: ' .$className."(".print_r($arguments,1).')');
          	}
          }
  
  
          return  self::$_registry[$registerKey];
      }
code: public static function getSingletonInstance($className, array $arguments = array())
      {	
      	
      	$registerKey = $className;
      
          if (!isset(self::$_registry[$registerKey])) {
  
          	if(class_exists($className)) {
              	self::$_registry[$registerKey] = new $className($arguments);
              	
          	}else {
   
          		throw new Exception ('Invalid class name:: ' .$className."(".print_r($arguments,1).')');
          	}
          }
  
  
          return  self::$_registry[$registerKey];
      }
code_tokens: public static function getSingletonInstance ( $ className , array $ arguments = array ( ) ) { $ registerKey = $ className ; if ( ! isset ( self :: $ _registry [ $ registerKey ] ) ) { if ( class_exists ( $ className ) ) { self :: $ _registry [ $ registerKey ] = new $ className ( $ arguments ) ; } else { throw new Exception ( 'Invalid class name:: ' . $ className . "(" . print_r ( $ arguments , 1 ) . ')' ) ; } } return self :: $ _registry [ $ registerKey ] ; }
docstring: This helper method create a singleton object , given the name of the class
  @param $className
  @param array $arguments arguemnet for class constructor
  @return mixed
  @throws Exception
  Simple usage:
  CheckoutApi_Lib_Factory::getSingletonInstance('CheckoutApi_Client_ClientGW3');
docstring_tokens: This helper method create a singleton object given the name of the class