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 pro ARES (Administrativní registr ekonomických subjektů) — vyhledávání firem podle IČO i názvu s automatickým cachováním výsledků. PHP 8.1+.
Features
- 🔍 Vyhledání podle IČO — strukturovaný výsledek s adresou, DIČ, právní formou
- 📝 Fulltextové vyhledávání — hledání firem podle názvu s limitem výsledků
- 💾 Automatické cachování — konfigurovatelný TTL (výchozí 1 měsíc)
- ✅ Kontrola aktivity — ověření, zda firma není zaniklá
- 🎯 Nette integrace — DI extension s auto-registrací přes
composer.json - 🛡️ Type-safe — PHP 8.1+ s strict types a typed properties
Requirements
- PHP 8.1+
- Nette 3.1+ / 4.0+
Instalace
Registrace
Extension se registruje automaticky díky extra.nette.extensions v composer.json.
Ruční registrace v config.neon:
Konfigurace (volitelná)
Použití
Vyhledání firmy podle IČO
Vyhledání firem podle názvu
Kontrola aktivity firmy
Získání DIČ
Použití v AJAX handleru (typicky pro formuláře)
toArray() vrací:
Cache
Výsledky se automaticky cachují (výchozí: 1 měsíc). Manuální invalidace:
AresResult
Objekt AresResult obsahuje:
| Property | Typ | Popis |
|---|---|---|
ico |
string |
IČO (8 číslic) |
dic |
?string |
DIČ (formát CZ + IČO) |
obchodniJmeno |
string |
Obchodní jméno |
pravniForma |
?string |
Kód právní formy |
ulice |
?string |
Název ulice |
cisloDomovni |
?int |
Číslo popisné |
cisloOrientacni |
?int |
Číslo orientační |
mesto |
?string |
Obec |
castObce |
?string |
Část obce |
psc |
?int |
PSČ |
kodStatu |
?string |
Kód státu |
textovaAdresa |
?string |
Celá adresa textem |
datumVzniku |
?string |
Datum vzniku |
datumZaniku |
?string |
Datum zániku |
Helper metody: getStreet(), getCity(), getFormattedPsc(), toArray().
API
Extension využívá oficiální ARES REST API v3:
GET /ekonomicke-subjekty/{ico}— vyhledání podle IČOPOST /ekonomicke-subjekty/vyhledat— fulltextové vyhledávání
Bez autentizace, bez rate-limitu ze strany ARES (doporučujeme rozumné cachování).
Testing
Contributing
Pull requesty jsou vítány! Pro větší změny prosím nejprve otevřete issue.
- Fork repozitáře
- Vytvořte feature branch (
git checkout -b feature/nova-funkce) - Commit změn (
git commit -m 'feat: popis') - Push branch (
git push origin feature/nova-funkce) - Otevřete Pull Request
Podpora
- 📧 Email: [email protected]
- 🐛 Bug reports: GitHub Issues
- 📖 ARES API docs: ares.gov.cz
Licence
MIT License — viz LICENSE
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