`DTA::parse`

Parser. Read data from an existing DTA file content.

       require_once '/DTA.php';

         void
         DTA::parse

         string
         $input

&title.desc;

Parsing can leave us with four situations:

- the input is parsed correctly => valid DTA object.

- the input is parsed but a checksum does not match the data read => valid DTA object. throws a Payment_DTA_ChecksumException.

- the n-th transaction cannot be parsed => parsing stops there, yielding a valid DTA object, but with only the first n-1 transactions and without checksum verification. throws a Payment_DTA_ParseException.

- a parsing error occurs in the A record => the DTA object is invalid throws a Payment_DTA_FatalParseException.

&title.param;

&type.string; `$input`

- content of DTA file

&title.throws;

throws Payment_DTA_Exception on unrecognized input

&title.note; ¬e.notstatic;