original_string: public static function getApi(array $arguments = array(),$_apiClass = null)
      {
      	if($_apiClass) {
      		self::setApiClass($_apiClass);
      	}
                  
          //Initialise the exception library
          $exceptionState = CheckoutApi_Lib_Factory::getSingletonInstance('CheckoutApi_Lib_ExceptionState');
          $exceptionState->setErrorState(false);
          
          return CheckoutApi_Lib_Factory::getSingletonInstance(self::getApiClass(),$arguments);
      }
code: public static function getApi(array $arguments = array(),$_apiClass = null)
      {
      	if($_apiClass) {
      		self::setApiClass($_apiClass);
      	}
                  
          //Initialise the exception library
          $exceptionState = CheckoutApi_Lib_Factory::getSingletonInstance('CheckoutApi_Lib_ExceptionState');
          $exceptionState->setErrorState(false);
          
          return CheckoutApi_Lib_Factory::getSingletonInstance(self::getApiClass(),$arguments);
      }
code_tokens: public static function getApi ( array $ arguments = array ( ) , $ _apiClass = null ) { if ( $ _apiClass ) { self :: setApiClass ( $ _apiClass ) ; } //Initialise the exception library $ exceptionState = CheckoutApi_Lib_Factory :: getSingletonInstance ( 'CheckoutApi_Lib_ExceptionState' ) ; $ exceptionState -> setErrorState ( false ) ; return CheckoutApi_Lib_Factory :: getSingletonInstance ( self :: getApiClass ( ) , $ arguments ) ; }
docstring: Helper static function to get singleton instance of a gateway interface.
  @param array $arguments A set arguments for initialising class constructor.
  @param null|string $_apiClass Gateway class name.
  @return CheckoutApi_Client_Client An singleton instance of CheckoutApi_Client_Client
  @throws Exception
docstring_tokens: Helper static function to get singleton instance of a gateway interface .