zazimou / cap
通用警报协议版本 1.2 读取器
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: 2024-09-29 05:57:07 UTC
README
CAP 是用于读取通用警报协议版本 1.2 的库
目前,此库仅针对捷克 ČHMÚ(捷克水文气象研究所)的结构进行开发
捷克语通用警报协议文档
https://www.chmi.cz/files/portal/docs/meteo/om/vystrahy/doc/Dokumentace_CAP.pdf
功能
- 您可以下载此文件并作为已知对象阅读,而不会出现任何问题
- 一些内容已修改为对象(字符串与日期时间到 \DateTime,...)
修改为对象
- 所有带日期时间的字符串到
\DateTime
- 所有具有对象值的字符串(例如,引用、发送者名称等)
- 所有可能具有多个值的属性都进行了数组处理,所有这些属性都有复数名称
安装
Composer
{
"require": {
"zazimou/cap": "*"
}
}
使用方法
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);
变更日志
1.0.0
- 库的第一个版本