thestormwinter / cap
v0.1.2
2020-03-26 09:39 UTC
Requires
- php: >=7.2
- 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: 2022-04-01 09:02:26 UTC
README
CAP 是一个用于读取通用警报协议版本 1.2 的库
目前该库仅针对捷克 ČHMÚ(捷克水文气象研究所)结构进行开发
捷克语通用警报协议文档
http://portal.chmi.cz/files/portal/docs/meteo/om/vystrahy/doc/Dokumentace_CAP.pdf
特性
- 您可以下载此文件,无问题地作为已知对象进行读取
- 部分内容已修改为对象(字符串与 datetime 到 \DateTime,...)
修改为对象
- 所有带有 datetime 值的字符串到
\DateTime
- 所有可对象化的字符串值(例如,引用、发送者名称等)
- 所有可能具有多个值的属性都进行了数组化,这些属性具有复数名称
安装
Composer
{
"require": {
"thestormwinter/cap": "*"
}
}
使用
use theStormWinter\CAP\Cap; // find Url where is cap file uploaded $url = "http://portal.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);
变更日志
0.1.1
- 添加 .gitattributes
0.1.0
- 库的第一个版本