constructor `DTA::__construct`

Constructor. Creates an empty DTA object or imports one.

       require_once '/DTA.php';

         void      constructor
         DTA::__construct

         integer|string
         $type

&title.desc;

If the parameter is a string, then it is expected to be in DTA format an its content (sender and transactions) is imported. If the string cannot be parsed at all then an empty DTA object with type DTA_CREDIT is returned. If only parts of the string can be parsed, then all transactions before the error are included into the object. The user should use getParsingError() to check whether a parsing error occured.

Otherwise the parameter has to be the type of the new DTA object, either DTA_CREDIT or DTA_DEBIT. In this case exceptions are never thrown to ensure compatibility.

&title.param;

`integer|string` `$type`

- Either a string with DTA data or the type of the new DTA file (DTA_CREDIT or DTA_DEBIT). Must be set.

&title.throws;

throws no exceptions thrown

&title.note; ¬e.notstatic;