antanasga / xmlrpcdecode
解码 XMLRPC 请求的简单方式
v0.1.4
2021-08-02 06:34 UTC
Requires
- php: >=7.0.0
Requires (Dev)
- antanasga/xmlrpcencode: ^0.1.1
README
解码 XMLRPC 请求的简单方式
文档
安装
使用 composer 安装
composer.json:
"require": { "antanasga/xmlrpcdecode": "^0.1.4" }
在终端
$ composer require antanasga/xmlrpcdecode
用法
通过 Decode 类的接口。
__construct - 接受有效的 XML 字符串的字符串值,如果需要抛出错误或故障代码,可以传递布尔值
fetch - 方法返回值数组
errorInfo - 方法返回包含 faultCode 和 faultString 值的 ResponseError 对象
// ... $e = new Decode($validXMLString); var_dump($e->fetch()); if ($e->errorInfo() !== null) { die(); // your error handling }