lightools / ares
Simple finder of Czech companies in ARES database.
Installs: 6 686
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
- bitbang/http: ~0.3.0
- lightools/xml: ~1.0.0
Requires (Dev)
- php: >=5.5
- mockery/mockery: ~0.9.4
- nette/tester: ~1.7.1
This package is auto-updated.
Last update: 2022-10-04 10:17:28 UTC
README
This library provides simple interface for finding basic information about Czech companies registered in ARES database.
Installation
$ composer require lightools/ares
Simple usage
$client = new Bitbang\Http\Clients\CurlClient(); // you will probably need to setup CURLOPT_CAINFO or CURLOPT_SSL_VERIFYPEER $loader = new Lightools\Xml\XmlLoader(); $finder = new Lightools\Ares\CompanyFinder($client, $loader); try { $company = $finder->find('66872944'); if ($company === NULL) { // not found } else { echo $company->getVatNumber(); } } catch (Lightools\Ares\LookupFailedException $e) { // process exception }
How to run tests
$ vendor/bin/tester tests