背书 / 同意包
通过DynamoDb提供电子邮件同意管理的支持
dev-master
2024-07-19 13:35 UTC
Requires
- aws/aws-sdk-php-symfony: ~1.0|~2.0
- symfony/framework-bundle: ~5.0|~6.0
Requires (Dev)
- phpunit/phpunit: ~5|~7|~9
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许可证许可