consoneo/ecoffre-fort-bundle

用于映射 e-coffre-fort.fr HTTP API 的组件包

v1.1.2 2021-12-08 08:55 UTC

This package is not auto-updated.

Last update: 2024-09-14 16:34:39 UTC


README

SensioLabsInsight

安装

使用 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 的每个保险箱都支持以下方法:

putFile(存储 API)

getFile(查询 API)

removeFile(删除 API)

getCert(获取合规证书 API)

moveFile(移动文件 API)