astina / solvency-bundle
此包已 弃用 并不再维护。未建议替代包。
Symfony2 集成偿付能力检查提供者的捆绑包
1.1.0
2015-12-23 21:56 UTC
This package is not auto-updated.
Last update: 2022-07-09 02:29:54 UTC
README
风险检查服务的集成捆绑包。目前仅实现了 DeltaVista 提供者。
安装
步骤 1: 添加到 composer.json
"require" : {
// ...
"astina/solvency-bundle":"dev-master",
}
步骤 2: 启用捆绑包
在内核中启用捆绑包
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Astina\Bundle\SolvencyBundle\AstinaSolvencyBundle(), ); }
步骤 3: 配置
将 WSDL URL 和 DeltaVista 凭证添加到您的 config.yml
# app/config.yml astina_solvency: provider: deltavista: wsdl_url: http://example.org/path/to.wsdl user: user password: 123 endpoint_url: ~ # only needs to be set if another then the default one should be used (e.g. for testing)
缓存
默认情况下,所有请求都会缓存,因为风险检查提供者通常按请求计费。因此,我们不使用 Symfony 缓存目录,而使用单独的目录。您可以在配置中设置缓存寿命和目录。
# app/config.yml astina_solvency: cache: cache_dir: /my/cache/dir lifetime: ~ # null means "forever"