synaq / zasa-bundle
Symfony2 对 Zimbra Soap Admin API(ZASA)的包装器
Requires
- php: ^5.4|^7
- ext-curl: *
- symfony/framework-bundle: ^2.5|^3.4
- synaq/curl-bundle: ^1.0
Requires (Dev)
- mockery/mockery: ^0.9.5
- phpunit/phpunit: ^4.8|^5
- dev-master
- 6.0
- 5.5
- 5.4.1
- 5.4
- 5.3.1
- 5.3
- 5.2
- 5.1.2
- 5.1.1
- 5.1
- 5.0
- 4.5
- 4.4
- 4.3
- 4.2
- 4.1
- 4.0
- 3.3.2
- 3.3
- 3.2
- 3.1.1
- 3.1
- 3.0
- 2.2.2
- 2.2.1
- 2.2
- 2.1
- 2.0
- 1.7.1
- 1.7
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6
- 1.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3
- 1.2
- 1.1
- 1
- dev-dependabot/composer/symfony/http-kernel-4.4.50
- dev-develop
- dev-release/3.3.2
- dev-feature/addFolders
- dev-release/1.3.4
This package is auto-updated.
Last update: 2024-08-30 01:12:42 UTC
README
A Symfony2 wrapper for the Zimbra SOAP Admin API (ZASA). This bundle uses a custom XML builder to post SOAP requests over CURL or using the fopen() wrappers.
This bundle works with Zimbra 7 & 8
This bundle was written to work specifically with our business model, so some functions return non-standard output. However, it should work with many use cases.
需求
- PHP 5.3 with curl support
- Symfony 2.7 or greater
安装
步骤 1
使用 composer 管理依赖关系并下载 SynaqZasaBundle
$ php composer.phar update synaq/zasa-bundle
步骤 2
将包添加到您的 AppKernel
// app/AppKernel.php public function registerBundles() { return array( // ... new Synaq\ZasaBundle\SynaqZasaBundle(), new Synaq\CurlBundle\SynaqCurlBundle(), // ... ); }
步骤 3
添加包配置
synaq_zasa: server: your-zimbra-server.com admin_user: your-admin-user admin_pass: your-admin-password use_fopen: true|false auth_token_path: /path/to/optional/existing/auth/token rest_base_url: http://your-zimbra-server-rest-url-without-service-endpoint.some-host.com synaq_curl: cookie_file: false options: { CURLOPT_RETURNTRANSFER: true, CURLOPT_SSL_VERIFYPEER: false, CURLOPT_SSL_VERIFYHOST: false, CURLOPT_SSL_CIPHER_LIST: %curl_cipher_list% }
##使用 您可以通过获取 'synaq_zasa.connector' 服务来使用 Zimbra 连接器
class SomeController extends Controller { public function someAction() { //... $connector = $this->get('synaq_zasa.connector'); //... } }
然后您可以使用控制器进行请求
$account = $connector->getAccount('user@domain.com');
请参阅 ZimbraConnector 类以获取可用类。
##开发
可以使用包含的 Dockerfile 和现成的构建脚本来构建包含完整开发环境的 Docker 镜像
./scripts/docker/build.sh
这会构建一个 synaq/zimbra-connector-dev 镜像,该镜像已预配置 XDebug 以远程调试到本地 XDebug 客户端。
要在一个基于该镜像的容器内进行交互式终端会话,其中项目工作目录已挂载为 /opt/project,请运行
./scripts/docker/terminal.sh