1. Go to this page and download the library: Download digitalcz/register-adries library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
digitalcz / register-adries example snippets
$register = new DigitalCz\RegisterAdries\RegisterAdries();
$response = $register
->request() // create RequestBuilder
->regions() // set resource to fetch
->limit(5) // limit number of results
->offset(10) // offset first result
->execute(); // execute the request and return response
$response->getRecords(); // DigitalCz\RegisterAdries\Response\Region[]
$response->getTotal(); // total number of results
$register = new DigitalCz\RegisterAdries\RegisterAdries();
$register->findRegion(9); // returns DigitalCz\RegisterAdries\Response\Region or null
$register->findCounty(9); // returns DigitalCz\RegisterAdries\Response\County or null
$register->findMunicipality(9); // returns DigitalCz\RegisterAdries\Response\Municipality or null
$register->findDistrict(9); // returns DigitalCz\RegisterAdries\Response\District or null
$register->findStreet(9); // returns DigitalCz\RegisterAdries\Response\Street or null
$register->findUnit(9); // returns DigitalCz\RegisterAdries\Response\Unit or null
$register->findBuilding(9); // returns DigitalCz\RegisterAdries\Response\Building or null
$register->findEntrance(9); // returns DigitalCz\RegisterAdries\Response\Entrance or null
$register = new DigitalCz\RegisterAdries\RegisterAdries();
$register
->request()
// ...
->resource('region')
->resource(DigitalCz\RegisterAdries\RegisterResource::REGION)
->regions()
// ...
->counties()
->municipalities()
->districts()
->streets()
->units()
->buildings()
->entrances();
// It isn't possible to request more resources, this is just example
// example
$symfonyHttpClient = Symfony\Component\HttpClient\Psr18Client();
$register = new DigitalCz\RegisterAdries\RegisterAdries(
$symfonyHttpClient,
$symfonyHttpClient // symfony PSR18 client is also PSR17 factory
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.