<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
swisnl / geocoder-php-nationaal-georegister-provider example snippets
bash
$ composer
php
// Create geocoder
$client = new \GuzzleHttp\Client();
$geocoder = new \Swis\Geocoder\NationaalGeoregister\NationaalGeoregister($client);
// Geocode!
$query = \Geocoder\Query\GeocodeQuery::create(...);
$result = $geocoder->geocodeQuery($query);
php
// On the geocoder instance:
$client = new \GuzzleHttp\Client();
$options = ['fq' => 'bron:BAG'];
$geocoder = new \Swis\Geocoder\NationaalGeoregister\NationaalGeoregister($client, $options);
// Or just once on the query:
$query = \Geocoder\Query\GeocodeQuery::create(...)->withData('fq', 'bron:BAG');