背书/同意包

通过DynamoDb提供电子邮件同意管理的支持

安装量: 1,046

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 9

分支: 0

开放问题: 1

类型:symfony-bundle

dev-master 2024-07-19 13:35 UTC

This package is auto-updated.

Last update: 2024-09-19 13:58:09 UTC


README

提供通过AWS DynamoDb管理电子邮件同意的机制

安装

使用composer安装它

composer require vouchedfor/consent-bundle:dev-master

然后,在您的 AppKernel bundles 中添加以下内容

// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        ...
        new VouchedFor\ConsentBundle\VouchedForConsentBundle(),
        ...
    );
    ...
}

config.yml 中添加DynamoDB中同意表的名称。例如

// app/config/config.yml
vouched_for_consent:
    table_name: consent
    password: secretpasswordforemailencryption

示例用法

    $consentHandler = $this->get('vouchedfor_consent');

    $encryptedEmail = $consentHandler->encrypt('info@test.com');
    
    $services = [
        'marketing_emails': true,
        'service_emails': true,
        'third_party_emails: false
    ];

    $consentHandler->update($encryptedEmail, '2018-01-03 12:30:12', $services);

许可证

同意包免费使用,并受MIT许可证许可