DigitickSepaDomBuilderDomBuilderFactory

The WooCommerce Germanized Digitick Sepa DomBuilder DomBuilderFactory class.

Defined (1)

The class is defined in the following location(s).

/includes/gateways/direct-debit/libraries/php-sepa-xml/DomBuilder/DomBuilderFactory.php  
  1. class DomBuilderFactory 
  2. public static function createDomBuilder(TransferFileInterface $transferFile, $painFormat = '') 
  3. $transferFileClass = get_class($transferFile); 
  4. switch ($transferFileClass) { 
  5. case 'Digitick\Sepa\TransferFile\CustomerCreditTransferFile': 
  6. $domBuilder = $painFormat ? new CustomerCreditTransferDomBuilder($painFormat) : new CustomerCreditTransferDomBuilder(); 
  7. $transferFile->accept($domBuilder); 
  8. break; 
  9. case 'Digitick\Sepa\TransferFile\CustomerDirectDebitTransferFile': 
  10. $domBuilder = $painFormat ? new CustomerDirectDebitTransferDomBuilder($painFormat) : new CustomerDirectDebitTransferDomBuilder(); 
  11. $transferFile->accept($domBuilder); 
  12. break; 
  13. default: 
  14. throw new InvalidArgumentException('The given object is not a valid Transferfile: ' . $transferFileClass); 
  15.  
  16. return $domBuilder;