This library is a simple Object Oriented wrapper for the Zimbra SOAP API.
- PHP 8.1.x or later,
- PSR Discovery library for searching installed http clients and http message factories,
- Serializer library for (de-)serializing XML,
- (optional) PHPUnit to run tests,
Via Composer
$ composer require zimbra-api/soap-api
or just add it to your composer.json
file directly.
{
"require": {
"zimbra-api/soap-api": "*"
}
}
<?php declare(strict_types=1);
require_once 'vendor/autoload.php';
use Zimbra\Admin\AdminApi;
use Zimbra\Common\Enum\AccountBy;
use Zimbra\Common\Struct\AccountSelector;
$api = new AdminApi('https://zimbra.server:7071/service/admin/soap');
$api->auth($username, $password);
$account = $api->getAccountInfo(new AccountSelector(AccountBy::NAME, $accountName));
From $api
object, you can access to all Zimbra Admin API.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.