| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- /**
- * This file is part of the kerio-api-php.
- *
- * Copyright (c) Kerio Technologies s.r.o.
- *
- * For the full copyright and license information, please view
- * the file license.txt that was distributed with this source code
- * or visit Developer Zone. (http://www.kerio.com/developers)
- *
- * Do not modify this source code.
- * Any changes may be overwritten by a new version.
- */
- require_once(dirname(__FILE__) . '/class/KerioApi.php');
- /**
- * Administration API for Kerio Directory.
- * STATUS: In progress, might change in the future
- *
- * This class implements product-specific methods and properties and currently is under development.
- * Class is not intended for stable use yet.
- * Functionality might not be fully verified, documented, or even supported.
- *
- * Please note that changes can be made without further notice.
- *
- * Example:
- * <code>
- * <?php
- * require_once(dirname(__FILE__) . '/src/KerioDirectory.php');
- *
- * $api = new KerioDirectory('Sample application', 'Company Ltd.', '1.0');
- *
- * try {
- * $api->login('directory.company.tld', 'admin', 'SecretPassword');
- * $api->sendRequest('...');
- * $api->logout();
- * } catch (KerioApiException $error) {
- * print $error->getMessage();
- * }
- * ?>
- * </code>
- *
- * @copyright Copyright © 2012-2012 Kerio Technologies s.r.o.
- * @license http://www.kerio.com/developers/license/sdk-agreement
- * @version 1.4.0.234
- */
- class KerioDirectoryApi extends KerioApi {
- /**
- * Defines product-specific JSON-RPC settings
- * @var array
- */
- protected $jsonRpc = array(
- 'version' => '2.0',
- 'port' => 4101,
- 'api' => '/admin/jsonrpc/'
- );
- /**
- * Class constructor.
- *
- * @param string Application name
- * @param string Application vendor
- * @param string Application version
- * @return void
- * @throws KerioApiException
- */
- public function __construct($name, $vendor, $version) {
- parent::__construct($name, $vendor, $version);
- }
- /**
- * Get constants defined by product.
- *
- * @param void
- * @return array Array of constants
- */
- public function getConstants() {
- $response = $this->sendRequest('Server.getInfo');
- return $response['serverInfo'];
- }
- }
|