Download the PHP
package silarhi/caf-parser without Composer
On this page you can find all versions of the php package
silarhi/caf-parser. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
A PHP parser for CAF LA44ZZ payment slips.
Turn the plain-text "bordereau de paiement" sent by the Caisse d'Allocations Familiales into typed PHP objects.
---
## Features
- **LA44ZZ payment slips** — parses every payment line of the table (beneficiary, period, gross, deduction and net amounts)
- **Slip metadata** — processing and payment dates, CAF name and address, recipient name and address, reference, BIC, IBAN and total
- **Typed results** — dates as `DateTimeInterface`, amounts as `float`
- **French amount formats** — a comma, when present, is the decimal separator; spaces, no-break spaces and dots are
thousands separators (`1 298,50`, `1.298,50` and `1298.50` all give `1298.5`)
- **Strict validation** — malformed rows and invalid or out-of-range dates throw a `ParseException`
- **No dependencies** — plain PHP, works with Windows (`\r\n`) and Unix line endings
## Requirements
| Dependency | Version |
| ---------- | ------- |
| PHP | 8.2+ |
## Installation
## Usage
### Parse a LA44ZZ file
### What you get
`PaymentSlip` holds the slip metadata and its lines. Metadata getters return `null` when the information is missing from
the file:
| Getter | Type | Notes |
| --------------------------------------------- | -------------------- | ------------------------------------------------------- |
| `getProcessingDate()`, `getPaymentDate()` | `?DateTimeInterface` | Full dates (`d m Y`), at midnight |
| `getCafName()`, `getCafAddress()` | `?string` | e.g. `CAISSE D'ALLOCATIONS FAMILIALES DE HAUTE GARONNE` |
| `getRecipientName()`, `getRecipientAddress()` | `?string` | The landlord receiving the payment |
| `getReference()` | `?string` | `NM REFERENCE` of the slip |
| `getBic()`, `getIban()` | `?string` | IBAN without spaces |
| `getTotalAmount()` | `?float` | |
| `getLines()` | `PaymentSlipLine[]` | |
Each `PaymentSlipLine` exposes `getReference()` (housing/loan reference, may be empty), `getBeneficiaryReference()`,
`getBeneficiaryName()`, `getStartDate()` and `getEndDate()` (the month of the period, as the 1st of the month at
midnight), and `getGrossAmount()`, `getDeduction()` and `getNetAmount()` as floats.
### Error handling
`parse()` throws a `ParseException` when the content has no LA44ZZ payment table, when a row does not have the expected
columns, or when a date (row period or header date) is invalid or out of range: `13 2021` or `31 02 2021` are rejected
instead of being rolled over. Row errors carry the row number, e.g. `CAF Row n°2 could not be parsed`.
## Testing & Quality
## Contributing
Contributions are welcome! Please make sure your changes pass all quality checks before submitting a pull request:
## License
MIT License. See [LICENSE](LICENSE) for details.
---
Built with care by SILARHI.
If CAF Parser saves you time, consider giving it a star on GitHub.
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package silarhi/caf-parser contains the following files
Loading the files please wait ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.