2017 © Pedro Peláez
 

library pro6pp-php-wrapper

Wrapper for the Pro6PP API

image

pendonl/pro6pp-php-wrapper

Wrapper for the Pro6PP API

  • Wednesday, November 30, 2016
  • by Pendo
  • Repository
  • 1 Watchers
  • 3 Stars
  • 2,829 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 46 % Grown

The README.md

PHP Wrapper for Pro6PP Api

Latest version on Packagist Software License Travis branch Scrutinizer SensioLabs Insight Style Ci Total Downloads, (*1)

The PendoNL/pro6pp-php-wrapper package provides an easy to use way to communicate with Pro6PP's API to fetch location based data such as addresses, coordinates, etc. Below you can find a list all methods., (*2)

Installation & Usage

Install the package using composer or by downloading the zip. When downloading the zip you only need to include Pro6pp.php in your page., (*3)

composer require pendonl/pro6pp-php-wrapper, (*4)

Below you'll find a page with all methods. Please reference the class and API documentation by Pro6pp for all parameters., (*5)

API Documentation by Pro6pp (Dutch), (*6)

<?php

require __DIR__ . '/vendor/autoload.php';

$Pro6pp = new \PendoNL\Pro6pp\Pro6pp('api_code', 'json');

/**
 * Autocomplete an address. This can be achieved in different ways
 * (1) With a nl_fourpp postalcode
 * (2) With a nl_sixpp postalcode
 * (3) With a nl_sixpp postalcode housenumber and extension
 */

$Pro6pp->autocomplete(6225);
$Pro6pp->autocomplete('6225XS');
$Pro6pp->autocomplete('6225XS', 7);
$Pro6pp->autocomplete('6225XS', 7, 'c');

/**
 * Reverse address look-up. Provide the method with valid lat/lng
 * and you'll be presented with an address if found.
 */

$Pro6pp->reverse(50.858030, 5.717376);

/**
 * Find the nearest postalcodes from a given set of postalcodes compared
 * to a single postalcode. The second parameter takes an array with either
 * a nl_fourpp, a nl_sixpp or a set of lat/lng.
 */

$Pro6pp->locator(['6220','6221','6223','6224'], ['nl_fourpp' => 6216]);

/**
 * Find all postals within a given range. The second parameter is in meters.
 */

$Pro6pp->range(6225, 2500);

/**
 * Get autocomplete suggestions for city names, takes a second parameter for
 * the maximum number of results.
 */

$Pro6pp->suggest('Maast', 10);

/**
 * Calculate the distance between two nl_fourpp, 3rd parameter can be set to 'road',
 * be carefull: this is for supported account only.
 */

$Pro6pp->distance(6225, 6210, 'straight');

/**
 * Calculate distance between two coordinates
 */

$Pro6pp->coordinateDistance(50.858030, 5.717376, 50.840078, 5.659258);

Security

If you discover any security related issues, please email joshua@pendo.nl instead of using the issue tracker., (*7)

Credits

Thanks to Pro6PP for their efforts to create, maintain and update a postal database for a fair price., (*8)

About Pendo

Pendo is a webdevelopment agency based in Maastricht, Netherlands. If you'd like, you can visit our website., (*9)

License

The MIT License (MIT). Please see License File for more information., (*10)

The Versions

30/11 2016

dev-master

9999999-dev

Wrapper for the Pro6PP API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

by Joshua de Gier

11/11 2016

v1.0.1

1.0.1.0

Wrapper for the Pro6PP API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

by Joshua de Gier

11/11 2016

1.0.0

1.0.0.0

Wrapper for the Pro6PP API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

by Joshua de Gier