Download the PHP package nks-hub/nette-ares without Composer
On this page you can find all versions of the php package nks-hub/nette-ares. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nks-hub/nette-ares
More information about nks-hub/nette-ares
Files in nks-hub/nette-ares
Package nette-ares
Short Description Nette extension for Czech ARES API — company lookup by IČO, search by name, structured results with caching. PHP 8.1+.
License MIT
Homepage https://github.com/nks-hub/nette-ares
Informations about the package nette-ares
Nette ARES
Nette DI extension for ARES (the Czech Administrative Register of Economic Subjects): company lookup by IČO and by name, with cached results. PHP 8.1+.
Features
- 🔍 Lookup by IČO - Returns an
AresResultwith address, VAT ID (DIČ) and legal form - 📝 Search by name - Returns up to
limit(default 10) matching companies; the name needs at least 3 characters - 💾 Caching - Results are cached for
cacheTtl(default 1 month) and can be cleared per IČO - ✅ Activity check -
isActive()returns false for a dissolved or unknown company - 🎯 Nette integration - DI extension registered through
extra.nette.extensionsincomposer.json - 🛡️ Strict types - Every source file declares
strict_types=1; result properties are typed
Requirements
- PHP 8.1+
- Nette 3.1+ / 4.0+
Installation
Configuration
Nette picks the extension up from extra.nette.extensions in composer.json. To register it manually in config.neon:
Optional configuration:
Usage
Look up a company by IČO
Search companies by name
Check whether a company is active
Get the VAT ID (DIČ)
Use in an AJAX handler (typically for forms)
toArray() returns:
Cache
Results stay cached for cacheTtl (default 1 month). To invalidate them:
AresResult
| Property | Type | Description |
|---|---|---|
ico |
string |
IČO (8 digits) |
dic |
?string |
DIČ (format CZ + IČO) |
obchodniJmeno |
string |
Business name |
pravniForma |
?string |
Legal form code |
ulice |
?string |
Street name |
cisloDomovni |
?int |
Building number (číslo popisné) |
cisloOrientacni |
?int |
Orientation number (číslo orientační) |
mesto |
?string |
Municipality |
castObce |
?string |
Municipality part |
psc |
?int |
Postal code (PSČ) |
kodStatu |
?string |
Country code |
textovaAdresa |
?string |
Full address as text |
datumVzniku |
?string |
Date of establishment |
datumZaniku |
?string |
Date of dissolution |
Helper methods: getStreet(), getCity(), getFormattedPsc(), toArray().
API
The extension calls the ARES REST API v3:
GET /ekonomicke-subjekty/{ico}: lookup by IČOPOST /ekonomicke-subjekty/vyhledat: search by name
ARES requires no authentication and has no rate limit. Keep caching on anyway.
Development
There is no test suite. Validate the package manifest with:
Contributing
Contributions are welcome! For major changes, please open an issue first.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: description') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Support
- 📧 Email: [email protected]
- 🐛 Bug reports: GitHub Issues
- 📖 ARES API docs: ares.gov.cz
License
MIT License — see LICENSE for details.
Made with ❤️ by NKS Hub
All versions of nette-ares with dependencies
nette/di Version ^3.1 || ^4.0
nette/caching Version ^3.2 || ^4.0
nette/utils Version ^3.2 || ^4.0
nette/schema Version ^1.2 || ^2.0