PluginProbe
The GDPR Framework By Data443 / 2.5.0
The GDPR Framework By Data443 v2.5.0
2.5.0 2.4.0 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.3 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.39 1.0.4 1.0.40 1.0.41 1.0.42 1.0.43 1.0.44 1.0.45 1.0.46 All 41 releases
gdpr-framework / src / Singleton.php

Singleton.php in The GDPR Framework By Data443 2.5.0, at src/Singleton.php

87 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Codelight\GDPR;
3
4 if ( ! defined( 'ABSPATH' ) ) exit;
5
6 use Codelight\GDPR\DataSubject\DataSubjectIdentificator;
7 use Codelight\GDPR\DataSubject\DataSubjectAuthenticator;
8 use Codelight\GDPR\Modules\WPML\WPML;
9 use Codelight\GDPR\DataSubject\DataExporter;
10
11 class Singleton {
12 var $View;
13 var $Options;
14 var $Consent;
15 var $Helpers;
16 var $Themes;
17 var $DataSubject;
18 var $AdminNotice;
19 var $AdminError;
20 var $AdminInstallerNotice;
21 var $PrivacySafe;
22 var $AdminModal;
23 var $AdminPage;
24 var $AdminTabGeneral;
25 var $PluginUrl;
26 var $PluginPath;
27 var $PluginTemplatePath;
28 var $InstallerWizardUrl;
29 var $DataSubjectAuthenticator;
30 var $DataSubjectIdentificator;
31 var $DataExporter;
32 var $UserConsentModel;
33 var $DataManager;
34 var $Controller;
35 var $HelpUrl;
36
37 function init($path) {
38 $this->PluginUrl = plugin_dir_url($path);
39 $this->PluginPath = plugin_dir_path($path);
40 $this->PluginTemplatePath = plugin_dir_path($path) . 'views/';
41 $this->HelpUrl = 'https://www.data443.com/gdpr-framework/';
42
43 $this->InstallerWizardUrl = self_admin_url("index.php?page=gdpr-setup&gdpr-step=");
44
45 $this->View = new View();
46 $this->Options = new Options\Options();
47 $model = new Components\Consent\UserConsentModel();
48 $this->UserConsentModel = $model;
49 $this->Consent = new Components\Consent\ConsentManager($model);
50 $this->Helpers = new Helpers();
51 $this->Themes = new Components\Themes\Themes();
52 $this->DataSubject = new DataSubject\DataSubjectManager($this->Consent);
53
54 new WPML();
55 $identificator = new DataSubjectIdentificator($this->DataSubject, $this->Options, $model);
56 $authenticator = new DataSubjectAuthenticator($this->DataSubject, $identificator);
57 new Router($authenticator);
58 $this->DataSubjectAuthenticator = $authenticator;
59 $this->DataSubjectIdentificator = $identificator;
60 $this->DataExporter = new DataExporter();
61 new Components\PrivacyToolsPage\PrivacyToolsPage();
62 new Components\WordpressComments\WordpressComments($this->DataSubject);
63 $this->DataManager = new Components\WordpressUser\DataManager();
64 new Components\WordpressUser\WordpressUser($this->DataSubject, $this->DataManager);
65 new Components\Themes\Themes();
66
67 if (defined('WPCF7_VERSION')) {
68 new Modules\ContactForm7\ContactForm7($this->DataSubject, $this->Consent);
69 }
70
71 if (defined('FLAMINGO_VERSION')) {
72 new Modules\ContactForm7\Flamingo();
73 }
74
75 if ( defined('WC_VERSION') ) {
76 new Modules\WooCommerceGdpr\WooCommerceGdpr($this->DataSubject, $this->Consent);
77 }
78
79 if ( defined('EDD_VERSION') ) {
80 new Modules\EddGdpr\EddGdpr($this->DataSubject, $this->Consent);
81 }
82
83 if ( defined('ES_PLUGIN_VERSION') ) {
84 new Modules\NewsletterGdpr\NewsletterGdpr($this->DataSubject, $this->Consent);
85 }
86 }
87 }