consoneo / ecoffre-fort-bundle
用于映射 e-coffre-fort.fr HTTP API 的组件包
v1.1.2
2021-12-08 08:55 UTC
Requires
- php: >=5.4.1
- doctrine/doctrine-bundle: >=1.5
- doctrine/orm: >=2.4
- gedmo/doctrine-extensions: >=2.4
- symfony/monolog-bundle: ^3.3||^v3.7.0
Requires (Dev)
- mockery/mockery: dev-master
This package is not auto-updated.
Last update: 2024-09-14 16:34:39 UTC
README
安装
使用 Composer 安装 ConsoneoEcoffreFortBundle,只需在您的 'composer.json' 文件中添加以下内容:
{
require: {
"consoneo/ecoffre-fort-bundle": "*",
...
}
}
接下来,通过执行以下命令安装组件包:
php composer.phar update consoneo/ecoffre-fort-bundle
最后,将组件包添加到 'app/AppKernel.php' 文件中的 AppKernel 类的 registerBundles 函数中
public function registerBundles()
{
$bundles = array(
...
new Consoneo\Bundle\EcoffreFortBundle\ConsoneoEcoffreFortBundle(),
...
);
配置
通过将以下内容添加到 'app/config/config.yml' 文件中并使用您自己的配置来配置组件包:
consoneo_ecoffre_fort:
coffres:
coffre1:
email_origin: xxx
safe_id: xxx
part_id: xxx
password: xxx
coffre2:
email_origin: xxx
safe_id: xxx
part_id: xxx
password: xxx
保险箱映射
您可以通过映射服务访问所有声明的保险箱。在上面的例子中,我们声明了一个 `coffre1` 保险箱
$this->container->get('ecoffrefort.coffre_map')->get('coffre1');
用法
ConsoneoEcoffreFortBundle 的每个保险箱都支持以下方法: