gon-zoo82/soap-api

PHP包装库,用于Zimbra Soap API(Web服务)

dev-master 2016-01-22 16:50 UTC

This package is auto-updated.

Last update: 2024-08-29 01:19:23 UTC


README

此API是一个简单的面向对象的Zimbra Soap API(Web服务)包装器。它是用PHP 5.4编写的。它允许您轻松管理Zimbra账户、Zimbra域和Zimbra服务器。

要求

自动加载

使用Composerzimbra-api新版本。使用zimbra-api的第一步是下载Composer

$ curl -s http://getcomposer.org/installer | php

然后我们必须使用以下方式安装我们的依赖项

$ php composer.phar install

现在我们可以通过以下方式使用Composer的自动加载器

{
    "require": {
        "gon-zoo82/zimbra-api": "*"
    }
}

zimbra-api遵循其类的PSR-0命名约定,这意味着您可以轻松地将zimbra-api类的加载集成到自己的自动加载器中。

zimbra-api管理客户端的基本使用

<?php

// This file is generated by Composer
require_once 'vendor/autoload.php';

$api = new \Zimbra\AdminFactory::instance('https://:7071/service/admin/soap');
$api->auth('username', 'password');
$account = new \Zimbra\Struct\AccountSelector(\Zimbra\Enum\AccountBy::NAME(), 'username');
$accountInfo = $api->getAccountInfo($account);

$api对象,您可以访问所有Zimbra管理API。

##许可BSD 3-Clause

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.