2017 © Pedro Peláez
 

library ares

Simple library for fetching address information from ARES.cz

image

edgedesign/ares

Simple library for fetching address information from ARES.cz

  • Thursday, June 26, 2014
  • by vaclav.novotny@edgedesign.cz
  • Repository
  • 5 Watchers
  • 4 Stars
  • 2,017 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

Edgedesign ARES

Simple library for fetching information about legal subjects from Czech database called ARES.cz, (*1)

Usage

In simplest case, without using any proxy server, library can be instantiated like this:, (*2)

$parser = new \Edge\Ares\Parser\AddressParser();
$provider = new \Edge\Ares\Provider\HttpProvider();
$ares = new \Edge\Ares\Ares($parser, $provider);

In case proxy server needs to be specified, you can use this way:, (*3)

$proxyDecorator = new \Edge\Ares\Decorator\ProxyCurlDecorator($hostname, $proxy);
$parser = new \Edge\Ares\Parser\AddressParser();
$provider = new \Edge\Ares\Provider\HttpProvider($proxyDecorator);
$ares = new \Edge\Ares\Ares($parser, $provider);

When credentials needs to be specified too, you can slightly modify the example above:, (*4)

$proxyDecorator = new \Edge\Ares\Decorator\ProxyCurlDecorator($hostname, $proxy, $username, $password);
$parser = new \Edge\Ares\Parser\AddressParser();
$provider = new \Edge\Ares\Provider\HttpProvider($proxyDecorator);
$ares = new \Edge\Ares\Ares($parser, $provider);

When \Edge\Ares\Ares is instantiated, you can use it like this:, (*5)

try {
    /** @var \Edge\Ares\Ares $ares */
    /** @var \Edge\Ares\Container\Address $address */
    $address = $ares->fetchSubjectAddress(12345678);
} catch (\Edge\Ares\Exception\ExceptionInterface $e) {
    // Do some error handling here.
}

The Versions

26/06 2014

dev-master

9999999-dev

Simple library for fetching address information from ARES.cz

  Sources   Download

MIT

by Marek Makovec

26/06 2014

v0.1.1

0.1.1.0

Simple library for fetching address information from ARES.cz

  Sources   Download

MIT

by Marek Makovec

26/06 2014

v0.1.0

0.1.0.0

Simple library for fetching address information from ARES.cz

  Sources   Download

MIT

by Marek Makovec