Wallogit.com
2017 © Pedro Peláez
PHP Wrapper for the Voertuidata.nl SOAP webservice
PHP Wrapper for the Voertuigdata.nl SOAP webservice, (*1)
First, you'll need to require the package with Composer:, (*2)
$ composer require marcoboom/voertuigdata
This package requires PHP 5.4 with SOAP installed, (*3)
First, create an Instance of the Voertuigdata class, (*4)
$vd = new Voertuigdata\Voertuigdata('username', 'password');
Replace username and password with the given account., (*5)
Optional you can pass as third argument, an options array:, (*6)
$options = [ 'environment' => 'production', 'cache_wsdl' => WSDL_CACHE_NONE ];
If the environment option is not passed through. The class wil search for an ENVIRONMENT constant. If this is not equal to production, the testing environment of Voertuigdata will be used., (*7)
Within the instance you can call a method from the webservice, defined at http://www.voertuigdata.nl/soap/voertuigservice.asmx. The parameters of the method should be send through by an array., (*8)
Each method returns the raw object given by the webservice., (*9)
If the call failes it throws a VoertuigdataException., (*10)
try { $result = $vd->getPersonenautoInformatieMiddelsKenteken(['Kenteken'=>'56RPFV']); var_dump($result); } catch (Voertuigdata\VoertuigdataException $e) { var_dump($e->getMessage()); }