sumocoders / defactuur
PHP DeFactuur is a (wrapper)class to communicate with DeFactuur (https://www.defactuur.be).
v2.0.3
2024-08-06 12:24 UTC
Requires
- php: >=7.4.0
- ext-curl: *
- ext-json: *
- nyholm/psr7: ^1.4
- psr/http-client: ^1.0
Suggests
- symfony/http-client: Low-level HTTP-client
This package is auto-updated.
Last update: 2024-12-06 13:13:34 UTC
README
De Factuur is an online invoicing web application
About
PHP DeFactuur is a (wrapper)class to communicate with De Factuur.
License
PHP DeFactuur is BSD licensed.
Initialisation
Using symfony/httpclient:
use Nyholm\Psr7\Factory\Psr17Factory;
use Symfony\Component\HttpClient\Psr18Client;
$deFactuur = new DeFactuur(
new Psr18Client(),
new Psr17Factory(),
new Psr17Factory(),
'your_api_token'
);
Using Guzzle:
$deFactuur = new \SumoCoders\DeFactuur\DeFactuur(
new \GuzzleHttp\Client(),
new \Nyholm\Psr7\Factory\Psr17Factory(),
new \Nyholm\Psr7\Factory\Psr17Factory(),
'your_api_token'
);
You can replace Psr17Factory with your own implementations of PSR-17's RequestFactoryInterface and StreamFactoryInterface.
Using DeFactuur as a Service
Add the following to your services.yml:
SumoCoders\DeFactuur\DeFactuur:
arguments:
$apiToken: '%your.api.token%'
If you use auto-wiring, that's it!
Documentation
Each method in the class is well documented using PHPDoc.