# double-opt-in/5.3.1/src/Providers/GdprServiceProvider.php

Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification, version 5.3.1. 65 lines.

- Page: https://pluginprobe.com/plugins/double-opt-in/5.3.1/code/src/Providers/GdprServiceProvider.php
- Raw: https://pluginprobe.com/plugins/double-opt-in/5.3.1/raw/src/Providers/GdprServiceProvider.php
- Modified: 2026-07-13T09:16:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/double-opt-in/5.3.1/code/src/Providers/GdprServiceProvider.php#L10-L20`.

```php
<?php
/**
 * GDPR Service Provider
 *
 * @package Forge12\DoubleOptIn\Providers
 * @since   3.2.0
 */

namespace Forge12\DoubleOptIn\Providers;

use Forge12\DoubleOptIn\Admin\SingleConsentExportController;
use Forge12\DoubleOptIn\Container\BootableProviderInterface;
use Forge12\DoubleOptIn\Container\Container;
use Forge12\DoubleOptIn\Repository\OptInRepositoryInterface;
use Forge12\DoubleOptIn\Service\PrivacyIntegration;
use Forge12\Shared\LoggerInterface;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class GdprServiceProvider
 *
 * Registers all GDPR-related services in the DI container.
 */
class GdprServiceProvider implements BootableProviderInterface {

	/**
	 * {@inheritdoc}
	 */
	public function register( Container $container ): void {
		$container->singleton(
			PrivacyIntegration::class,
			function ( Container $c ) {
				return new PrivacyIntegration(
					$c->get( LoggerInterface::class ),
					$c->get( OptInRepositoryInterface::class )
				);
			}
		);

		$container->singleton(
			SingleConsentExportController::class,
			function ( Container $c ) {
				return new SingleConsentExportController(
					$c->get( LoggerInterface::class ),
					$c->get( OptInRepositoryInterface::class )
				);
			}
		);
	}

	/**
	 * {@inheritdoc}
	 */
	public function boot( Container $container ): void {
		// Register WordPress Privacy Tools hooks
		$container->get( PrivacyIntegration::class )->register();

		// Register single-record consent export (fallback if Pro is not active)
		$container->get( SingleConsentExportController::class )->registerActions();
	}
}

```
