简单的XML-RPC库(客户端和服务器端)

3.1.1 2018-05-12 08:30 UTC

This package is auto-updated.

Last update: 2024-08-24 21:47:39 UTC


README

unknown unknown

特性

XRL提供以下特性

  • 简单服务器,使用属性操作符->或数组访问器[]来提供方法。
  • 简单客户端,使用常规方法调用语法$client->procedure(42)来调用远程XML-RPC服务器提供的方法。
  • 直观的XML-RPC调用,PHP类型与其XML-RPC对应类型之间自动转换类型。
  • 可选验证XML-RPC消息(请求和响应)。
  • 两种XML输出格式(紧凑或缩进),便于调试潜在问题。
  • 许多不同类型的安装都是可能的(按从简单到复杂排序)
    • 使用PHAR存档
    • 使用composer
    • 从源码
  • 一个CLI脚本来查询远程XML-RPC服务器,显示流量(用于调试目的)等。
  • 一个包含XRL所有源代码的.phar存档,也可以用于替代常规CLI脚本。
  • 与PHP 5.3.4及以后版本的兼容性。

安装

有几种安装方式

  • 使用.phar存档

    https://github.com/fpoirotte/XRL/releases/latest下载最新版本的PHAR存档

  • 使用composer

    $ php composer.phar require fpoirotte/xrl
  • 从源码(稳定版本)

    • 作为git克隆

      $ git clone -b master git://github.com/fpoirotte/XRL.git
    • 作为.tar.gz存档

      $ wget --content-disposition https://github.com/fpoirotte/XRL/tarball/master
    • 作为.zip存档

      $ wget --content-disposition https://github.com/fpoirotte/XRL/zipball/master
  • 从源码(开发版本)

    • 作为git克隆

      $ git clone -b develop git://github.com/fpoirotte/XRL.git
    • 作为.tar.gz存档

      $ wget --content-disposition https://github.com/fpoirotte/XRL/tarball/develop
    • 作为.zip存档

      $ wget --content-disposition https://github.com/fpoirotte/XRL/zipball/develop

使用

客户端:查看client.php中的代码。

服务器:查看server.php中的代码。

贡献

如果您想为此项目做出贡献

  • 进行Fork.
  • 更改代码。
  • 发送给我们一个pull请求。

在发送pull请求之前,请仔细阅读下方的版权归属和许可部分。

版权和许可

XRL在3-clause BSD许可证下发布。许可证的在线副本可在https://raw.github.com/fpoirotte/XRL/develop/LICENSE找到。

我们要求贡献者将他们在贡献中的版权归属给“XRL团队”这个集体名称。

为了方便起见,我们还要求如果可能的话,您在贡献中保持与全局相同的许可(3-clause BSD许可证)。

版权和许可信息应复制到每个文件的顶部。以下给出了PHP文件的模板。对于其他类型的文件(RelaxNG模式、reStructuredText页面等),请根据该文件特定的语法要求调整模板。

由于我们希望在应得的贡献者中保留信用,您可以在每个您做出重大更改的类中自由添加Doxygen \authors命令,包括您的姓名和电子邮件。

PHP文件示例模板(取自XRL的自动加载器),包含版权信息、许可信息和贡献者信用

<?php
/*
 * This file is part of XRL, a simple XML-RPC Library for PHP.
 *
 * Copyright (c) 2012, XRL Team. All rights reserved.
 * XRL is licensed under the 3-clause BSD License.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace fpoirotte\XRL;

/**
 * \brief
 *      An helper class that wraps XRL's autoloader.
 *
 * \authors John Doe <john@doe.example.com>
 * \authors Jane Doe <jane@doe.example.com>
 */
class Autoload
{
    // Some code here...
}