This factory abstracts protocol specific's implementations for connecting to the Webservices.nl API. Providing an unified service layer independent of protocol.
The purpose of this library is to connect to any of the Webservices.nl API's (platforms) in a uniform way. Regardless of transport protocol it ships a proxy class for type hinted function calls to Webservices.nl function calls.
Webservices.nl support multiple protocols for connecting. Soap, XML-RPC, HTTP-RPC/REST. This library has support for multiple transfer protocols.
This library ships a SoapClient that extends the native PHP SoapClient
with a curl client for better timeout management. Also converts native PHP SoapFault
into custom platform exceptions where possible.
Scheduled to be released.
Scheduled to be released.
- PHP 5.6<=
- composer
- PSR-log LoggerInterface (optional)
Please use composer to install this library. Or download the latest zip
composer require webservices-nl/platform-connector
// Instantiate a ConnectorFactory with your given Webservices.nl credentials.
$factory = ConnectorFactory::build(
[
'username' => 'myusername',
'password' => 'secret'
],
LoggerInterface (optional)
);
// build a client
$client = $factory->create('soap', 'webservices');
// make type hinted function calls to any of the Webservices.nl API's
$response = $client->accountEditV2();
All parameters are expected to be in UTF-8 encoding, output is in UTF-8 as well.
This client is fully tested on PHP 5.6+ and 7+ To run tests:
./vendor/bin phpunit
Consult the online documentation. Any questions, remarks, bugs? Please mail us.
- technical questions: mailto:[email protected]
- support questions: mailto:support.webservices.nl