Skip to content

PaymentSlipParser

Silarhi\Caf\Parser\PaymentSlipParser is final. It has no constructor argument.

public function parse(string $content): PaymentSlip

Parses the content of a LA44ZZ file and returns a PaymentSlip with one PaymentSlipLine per row of the table, in the order of the file.

Throws a ParseException when the content has no payment table, a row or an amount is malformed, or a date is invalid. See parsing for the rules.

Constant Value Used for
DATE_FORMAT m Y The start and end months of the rows
FULL_DATE_FORMAT d m Y The processing and payment dates of the slip

Both are formats of DateTimeImmutable::createFromFormat(), and appear in the date error messages.