zazimou / cap
Common Alerting Protocol Version 1.2 reader
1.0.0
2022-04-01 09:00 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-simplexml: *
- php-curl-class/php-curl-class: ~8.0
Requires (Dev)
- nette/tester: ~2.0
- ninjify/nunjuck: ^0.2.0
This package is auto-updated.
Last update: 2025-03-01 00:30:16 UTC
README
CAP is library for reading Common Alerting Protocol Version 1.2
This library is for now developed only for Czech ČHMÚ (Český hydrometeorologický ústav) structures
Documentation of Common Alerting Protocol in czech language
https://www.chmi.cz/files/portal/docs/meteo/om/vystrahy/doc/Dokumentace_CAP.pdf
Features
- You can download this file and read as known object without problems
- some content is modified to objects (string with datetime to \DateTime, ...)
Modified to objects
- all strings with datetime values to
\DateTime
- all strings with objectable values (e.g. references, senderName,...)
- arrayed all properties where is possible multiple values, all this properties have plural names
Installation
Composer
{
"require": {
"zazimou/cap": "*"
}
}
Usage
use Zazimou\CAP\Cap; // find Url where is cap file uploaded $url = "https://www.chmi.cz/files/portal/docs/meteo/om/bulletiny/XOCZ50_OKPR.xml"; // create new instance of Cap $cap = new Cap; // download the file $file = $cap->read($url);
Changelog
1.0.0
- first version of library