@@ -11,10 +11,10 @@ |
||
11 | 11 | */ |
12 | 12 | interface FactoryInterface |
13 | 13 | { |
14 | - /** |
|
15 | - * @param string $fqcn Fully Qualified Class Name |
|
16 | - * @param array $arguments [optional] array of data required for construction |
|
17 | - * @return mixed |
|
18 | - */ |
|
19 | - public function create($fqcn, array $arguments = []); |
|
14 | + /** |
|
15 | + * @param string $fqcn Fully Qualified Class Name |
|
16 | + * @param array $arguments [optional] array of data required for construction |
|
17 | + * @return mixed |
|
18 | + */ |
|
19 | + public function create($fqcn, array $arguments = []); |
|
20 | 20 | } |
@@ -14,25 +14,25 @@ |
||
14 | 14 | */ |
15 | 15 | interface PersonalDataEraserInterface |
16 | 16 | { |
17 | - /** |
|
18 | - * Gets a translated string name for the data eraser |
|
19 | - * |
|
20 | - * @return string |
|
21 | - */ |
|
22 | - public function name(); |
|
17 | + /** |
|
18 | + * Gets a translated string name for the data eraser |
|
19 | + * |
|
20 | + * @return string |
|
21 | + */ |
|
22 | + public function name(); |
|
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * Erases a "page" of personal user data |
|
27 | - * |
|
28 | - * @return array { |
|
29 | - * @type boolean $items_removed whether items were removed successfully or not |
|
30 | - * @type boolean $items_retained whether any items were skipped or not |
|
31 | - * @type array $messages values are messages to show |
|
32 | - * @type boolean $done whether this eraser is done or has more pages |
|
33 | - * } |
|
34 | - */ |
|
35 | - public function erase($email_address, $page = 1); |
|
25 | + /** |
|
26 | + * Erases a "page" of personal user data |
|
27 | + * |
|
28 | + * @return array { |
|
29 | + * @type boolean $items_removed whether items were removed successfully or not |
|
30 | + * @type boolean $items_retained whether any items were skipped or not |
|
31 | + * @type array $messages values are messages to show |
|
32 | + * @type boolean $done whether this eraser is done or has more pages |
|
33 | + * } |
|
34 | + */ |
|
35 | + public function erase($email_address, $page = 1); |
|
36 | 36 | } |
37 | 37 | // End of file PersonalDataEraserInterface.php |
38 | 38 | // Location: EventEspresso\core\domain\services\admin/PersonalDataEraserInterface.php |
@@ -25,71 +25,71 @@ |
||
25 | 25 | */ |
26 | 26 | class PrivacyPolicyManager |
27 | 27 | { |
28 | - public function __construct() |
|
29 | - { |
|
30 | - add_action('current_screen', array($this, 'addPrivacyPolicy'), 9); |
|
31 | - } |
|
28 | + public function __construct() |
|
29 | + { |
|
30 | + add_action('current_screen', array($this, 'addPrivacyPolicy'), 9); |
|
31 | + } |
|
32 | 32 | |
33 | 33 | |
34 | - /** |
|
35 | - * For all the registered `PrivacyPolicyInterface`s, add their privacy policy content |
|
36 | - * |
|
37 | - * @param WP_Screen $screen |
|
38 | - * @throws InvalidClassException |
|
39 | - * @throws InvalidDataTypeException |
|
40 | - * @throws InvalidEntityException |
|
41 | - * @throws InvalidFilePathException |
|
42 | - * @throws InvalidIdentifierException |
|
43 | - * @throws InvalidInterfaceException |
|
44 | - */ |
|
45 | - public function addPrivacyPolicy(WP_Screen $screen) |
|
46 | - { |
|
47 | - /** @var RequestInterface $request */ |
|
48 | - $request = LoaderFactory::getLoader()->getShared(RequestInterface::class); |
|
34 | + /** |
|
35 | + * For all the registered `PrivacyPolicyInterface`s, add their privacy policy content |
|
36 | + * |
|
37 | + * @param WP_Screen $screen |
|
38 | + * @throws InvalidClassException |
|
39 | + * @throws InvalidDataTypeException |
|
40 | + * @throws InvalidEntityException |
|
41 | + * @throws InvalidFilePathException |
|
42 | + * @throws InvalidIdentifierException |
|
43 | + * @throws InvalidInterfaceException |
|
44 | + */ |
|
45 | + public function addPrivacyPolicy(WP_Screen $screen) |
|
46 | + { |
|
47 | + /** @var RequestInterface $request */ |
|
48 | + $request = LoaderFactory::getLoader()->getShared(RequestInterface::class); |
|
49 | 49 | |
50 | - if ($screen->id === 'tools' && $request->requestParamIsSet('wp-privacy-policy-guide')) { |
|
51 | - // load all the privacy policy stuff |
|
52 | - // add post policy text |
|
53 | - foreach ($this->loadPrivacyPolicyCollection() as $privacy_policy) { |
|
54 | - wp_add_privacy_policy_content($privacy_policy->getName(), $privacy_policy->getContent()); |
|
55 | - } |
|
56 | - } |
|
57 | - } |
|
50 | + if ($screen->id === 'tools' && $request->requestParamIsSet('wp-privacy-policy-guide')) { |
|
51 | + // load all the privacy policy stuff |
|
52 | + // add post policy text |
|
53 | + foreach ($this->loadPrivacyPolicyCollection() as $privacy_policy) { |
|
54 | + wp_add_privacy_policy_content($privacy_policy->getName(), $privacy_policy->getContent()); |
|
55 | + } |
|
56 | + } |
|
57 | + } |
|
58 | 58 | |
59 | 59 | |
60 | - /** |
|
61 | - * @return CollectionInterface|PrivacyPolicyInterface[] |
|
62 | - * @throws InvalidIdentifierException |
|
63 | - * @throws InvalidInterfaceException |
|
64 | - * @throws InvalidFilePathException |
|
65 | - * @throws InvalidEntityException |
|
66 | - * @throws InvalidDataTypeException |
|
67 | - * @throws InvalidClassException |
|
68 | - */ |
|
69 | - protected function loadPrivacyPolicyCollection() |
|
70 | - { |
|
71 | - $loader = new CollectionLoader( |
|
72 | - new CollectionDetails( |
|
73 | - // collection name |
|
74 | - 'privacy_policies', |
|
75 | - // collection interface |
|
76 | - 'EventEspresso\core\services\privacy\policy\PrivacyPolicyInterface', |
|
77 | - // FQCNs for classes to add (all classes within that namespace will be loaded) |
|
78 | - apply_filters( |
|
79 | - 'FHEE__EventEspresso_core_services_privacy_policy_PrivacyPolicyManager__privacy_policies', |
|
80 | - array('EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy') |
|
81 | - ), |
|
82 | - // filepaths to classes to add |
|
83 | - array(), |
|
84 | - // file mask to use if parsing folder for files to add |
|
85 | - '', |
|
86 | - // what to use as identifier for collection entities |
|
87 | - // using CLASS NAME prevents duplicates (works like a singleton) |
|
88 | - CollectionDetails::ID_CLASS_NAME |
|
89 | - ) |
|
90 | - ); |
|
91 | - return $loader->getCollection(); |
|
92 | - } |
|
60 | + /** |
|
61 | + * @return CollectionInterface|PrivacyPolicyInterface[] |
|
62 | + * @throws InvalidIdentifierException |
|
63 | + * @throws InvalidInterfaceException |
|
64 | + * @throws InvalidFilePathException |
|
65 | + * @throws InvalidEntityException |
|
66 | + * @throws InvalidDataTypeException |
|
67 | + * @throws InvalidClassException |
|
68 | + */ |
|
69 | + protected function loadPrivacyPolicyCollection() |
|
70 | + { |
|
71 | + $loader = new CollectionLoader( |
|
72 | + new CollectionDetails( |
|
73 | + // collection name |
|
74 | + 'privacy_policies', |
|
75 | + // collection interface |
|
76 | + 'EventEspresso\core\services\privacy\policy\PrivacyPolicyInterface', |
|
77 | + // FQCNs for classes to add (all classes within that namespace will be loaded) |
|
78 | + apply_filters( |
|
79 | + 'FHEE__EventEspresso_core_services_privacy_policy_PrivacyPolicyManager__privacy_policies', |
|
80 | + array('EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy') |
|
81 | + ), |
|
82 | + // filepaths to classes to add |
|
83 | + array(), |
|
84 | + // file mask to use if parsing folder for files to add |
|
85 | + '', |
|
86 | + // what to use as identifier for collection entities |
|
87 | + // using CLASS NAME prevents duplicates (works like a singleton) |
|
88 | + CollectionDetails::ID_CLASS_NAME |
|
89 | + ) |
|
90 | + ); |
|
91 | + return $loader->getCollection(); |
|
92 | + } |
|
93 | 93 | } |
94 | 94 | // End of file PrivacyPolicyManager.php |
95 | 95 | // Location: EventEspresso\core\domain\services\admin/PrivacyPolicyManager.php |
@@ -15,20 +15,20 @@ |
||
15 | 15 | */ |
16 | 16 | interface PrivacyPolicyInterface |
17 | 17 | { |
18 | - /** |
|
19 | - * Returns the translated name to display in this privacy policy's section's title |
|
20 | - * |
|
21 | - * @return string |
|
22 | - */ |
|
23 | - public function getName(); |
|
18 | + /** |
|
19 | + * Returns the translated name to display in this privacy policy's section's title |
|
20 | + * |
|
21 | + * @return string |
|
22 | + */ |
|
23 | + public function getName(); |
|
24 | 24 | |
25 | 25 | |
26 | - /** |
|
27 | - * Returns the suggested privacy policy content for this plugin. May contain HTML |
|
28 | - * |
|
29 | - * @return string |
|
30 | - */ |
|
31 | - public function getContent(); |
|
26 | + /** |
|
27 | + * Returns the suggested privacy policy content for this plugin. May contain HTML |
|
28 | + * |
|
29 | + * @return string |
|
30 | + */ |
|
31 | + public function getContent(); |
|
32 | 32 | } |
33 | 33 | // End of file PrivacyPolicyInterface.php |
34 | 34 | // Location: EventEspresso\core\domain\services\admin/PrivacyPolicyInterface.php |
@@ -11,45 +11,45 @@ |
||
11 | 11 | */ |
12 | 12 | interface CollectionDetailsInterface |
13 | 13 | { |
14 | - /** |
|
15 | - * @access public |
|
16 | - * @return string |
|
17 | - */ |
|
18 | - public function getCollectionInterface(); |
|
19 | - |
|
20 | - /** |
|
21 | - * @access public |
|
22 | - * @return string |
|
23 | - */ |
|
24 | - public function collectionName(); |
|
25 | - |
|
26 | - /** |
|
27 | - * @access public |
|
28 | - * @return string |
|
29 | - */ |
|
30 | - public function identifierType(); |
|
31 | - |
|
32 | - /** |
|
33 | - * @access public |
|
34 | - * @return string |
|
35 | - */ |
|
36 | - public function identifierCallback(); |
|
37 | - |
|
38 | - /** |
|
39 | - * @access public |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function getFileMask(); |
|
43 | - |
|
44 | - /** |
|
45 | - * @access public |
|
46 | - * @return array |
|
47 | - */ |
|
48 | - public function getCollectionFQCNs(); |
|
49 | - |
|
50 | - /** |
|
51 | - * @access public |
|
52 | - * @return array |
|
53 | - */ |
|
54 | - public function getCollectionPaths(); |
|
14 | + /** |
|
15 | + * @access public |
|
16 | + * @return string |
|
17 | + */ |
|
18 | + public function getCollectionInterface(); |
|
19 | + |
|
20 | + /** |
|
21 | + * @access public |
|
22 | + * @return string |
|
23 | + */ |
|
24 | + public function collectionName(); |
|
25 | + |
|
26 | + /** |
|
27 | + * @access public |
|
28 | + * @return string |
|
29 | + */ |
|
30 | + public function identifierType(); |
|
31 | + |
|
32 | + /** |
|
33 | + * @access public |
|
34 | + * @return string |
|
35 | + */ |
|
36 | + public function identifierCallback(); |
|
37 | + |
|
38 | + /** |
|
39 | + * @access public |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function getFileMask(); |
|
43 | + |
|
44 | + /** |
|
45 | + * @access public |
|
46 | + * @return array |
|
47 | + */ |
|
48 | + public function getCollectionFQCNs(); |
|
49 | + |
|
50 | + /** |
|
51 | + * @access public |
|
52 | + * @return array |
|
53 | + */ |
|
54 | + public function getCollectionPaths(); |
|
55 | 55 | } |
@@ -15,26 +15,26 @@ |
||
15 | 15 | */ |
16 | 16 | class InvalidCollectionIdentifierException extends OutOfBoundsException |
17 | 17 | { |
18 | - /** |
|
19 | - * InvalidCollectionIdentifierException constructor. |
|
20 | - * |
|
21 | - * @param $identifier |
|
22 | - * @param string $message |
|
23 | - * @param int $code |
|
24 | - * @param Exception|null $previous |
|
25 | - */ |
|
26 | - public function __construct($identifier, $message = '', $code = 0, Exception $previous = null) |
|
27 | - { |
|
28 | - if (empty($message)) { |
|
29 | - $message = sprintf( |
|
30 | - esc_html__( |
|
31 | - 'The supplied identifier "%1$s" does not exist within this collection. |
|
18 | + /** |
|
19 | + * InvalidCollectionIdentifierException constructor. |
|
20 | + * |
|
21 | + * @param $identifier |
|
22 | + * @param string $message |
|
23 | + * @param int $code |
|
24 | + * @param Exception|null $previous |
|
25 | + */ |
|
26 | + public function __construct($identifier, $message = '', $code = 0, Exception $previous = null) |
|
27 | + { |
|
28 | + if (empty($message)) { |
|
29 | + $message = sprintf( |
|
30 | + esc_html__( |
|
31 | + 'The supplied identifier "%1$s" does not exist within this collection. |
|
32 | 32 | You may need to delay adding this asset until the required dependency has been added.', |
33 | - 'event_espresso' |
|
34 | - ), |
|
35 | - $identifier |
|
36 | - ); |
|
37 | - } |
|
38 | - parent::__construct($message, $code, $previous); |
|
39 | - } |
|
33 | + 'event_espresso' |
|
34 | + ), |
|
35 | + $identifier |
|
36 | + ); |
|
37 | + } |
|
38 | + parent::__construct($message, $code, $previous); |
|
39 | + } |
|
40 | 40 | } |
@@ -15,25 +15,25 @@ |
||
15 | 15 | */ |
16 | 16 | class CollectionLoaderException extends RuntimeException |
17 | 17 | { |
18 | - /** |
|
19 | - * DuplicateCollectionIdentifierException constructor. |
|
20 | - * |
|
21 | - * @param Exception $previous |
|
22 | - * @param string $message |
|
23 | - * @param int $code |
|
24 | - */ |
|
25 | - public function __construct(Exception $previous, $message = '', $code = 0) |
|
26 | - { |
|
27 | - if (empty($message)) { |
|
28 | - $message = sprintf( |
|
29 | - esc_html__( |
|
30 | - 'The following error occurred during the creation and/or loading of this collection: %1$s %2$s', |
|
31 | - 'event_espresso' |
|
32 | - ), |
|
33 | - '<br />', |
|
34 | - $previous->getMessage() |
|
35 | - ); |
|
36 | - } |
|
37 | - parent::__construct($message, $code, $previous); |
|
38 | - } |
|
18 | + /** |
|
19 | + * DuplicateCollectionIdentifierException constructor. |
|
20 | + * |
|
21 | + * @param Exception $previous |
|
22 | + * @param string $message |
|
23 | + * @param int $code |
|
24 | + */ |
|
25 | + public function __construct(Exception $previous, $message = '', $code = 0) |
|
26 | + { |
|
27 | + if (empty($message)) { |
|
28 | + $message = sprintf( |
|
29 | + esc_html__( |
|
30 | + 'The following error occurred during the creation and/or loading of this collection: %1$s %2$s', |
|
31 | + 'event_espresso' |
|
32 | + ), |
|
33 | + '<br />', |
|
34 | + $previous->getMessage() |
|
35 | + ); |
|
36 | + } |
|
37 | + parent::__construct($message, $code, $previous); |
|
38 | + } |
|
39 | 39 | } |
@@ -15,25 +15,25 @@ |
||
15 | 15 | */ |
16 | 16 | class DuplicateCollectionIdentifierException extends OutOfRangeException |
17 | 17 | { |
18 | - /** |
|
19 | - * DuplicateCollectionIdentifierException constructor. |
|
20 | - * |
|
21 | - * @param $identifier |
|
22 | - * @param string $message |
|
23 | - * @param int $code |
|
24 | - * @param Exception|null $previous |
|
25 | - */ |
|
26 | - public function __construct($identifier, $message = '', $code = 0, Exception $previous = null) |
|
27 | - { |
|
28 | - if (empty($message)) { |
|
29 | - $message = sprintf( |
|
30 | - esc_html__( |
|
31 | - 'The supplied identifier "%1$s" already exists within this collection.', |
|
32 | - 'event_espresso' |
|
33 | - ), |
|
34 | - $identifier |
|
35 | - ); |
|
36 | - } |
|
37 | - parent::__construct($message, $code, $previous); |
|
38 | - } |
|
18 | + /** |
|
19 | + * DuplicateCollectionIdentifierException constructor. |
|
20 | + * |
|
21 | + * @param $identifier |
|
22 | + * @param string $message |
|
23 | + * @param int $code |
|
24 | + * @param Exception|null $previous |
|
25 | + */ |
|
26 | + public function __construct($identifier, $message = '', $code = 0, Exception $previous = null) |
|
27 | + { |
|
28 | + if (empty($message)) { |
|
29 | + $message = sprintf( |
|
30 | + esc_html__( |
|
31 | + 'The supplied identifier "%1$s" already exists within this collection.', |
|
32 | + 'event_espresso' |
|
33 | + ), |
|
34 | + $identifier |
|
35 | + ); |
|
36 | + } |
|
37 | + parent::__construct($message, $code, $previous); |
|
38 | + } |
|
39 | 39 | } |
@@ -15,25 +15,25 @@ |
||
15 | 15 | */ |
16 | 16 | class CollectionDetailsException extends RuntimeException |
17 | 17 | { |
18 | - /** |
|
19 | - * DuplicateCollectionIdentifierException constructor. |
|
20 | - * |
|
21 | - * @param Exception $previous |
|
22 | - * @param string $message |
|
23 | - * @param int $code |
|
24 | - */ |
|
25 | - public function __construct(Exception $previous, $message = '', $code = 0) |
|
26 | - { |
|
27 | - if (empty($message)) { |
|
28 | - $message = sprintf( |
|
29 | - esc_html__( |
|
30 | - 'The following error occurred during the collection details generation: %1$s %2$s', |
|
31 | - 'event_espresso' |
|
32 | - ), |
|
33 | - '<br />', |
|
34 | - $previous->getMessage() |
|
35 | - ); |
|
36 | - } |
|
37 | - parent::__construct($message, $code, $previous); |
|
38 | - } |
|
18 | + /** |
|
19 | + * DuplicateCollectionIdentifierException constructor. |
|
20 | + * |
|
21 | + * @param Exception $previous |
|
22 | + * @param string $message |
|
23 | + * @param int $code |
|
24 | + */ |
|
25 | + public function __construct(Exception $previous, $message = '', $code = 0) |
|
26 | + { |
|
27 | + if (empty($message)) { |
|
28 | + $message = sprintf( |
|
29 | + esc_html__( |
|
30 | + 'The following error occurred during the collection details generation: %1$s %2$s', |
|
31 | + 'event_espresso' |
|
32 | + ), |
|
33 | + '<br />', |
|
34 | + $previous->getMessage() |
|
35 | + ); |
|
36 | + } |
|
37 | + parent::__construct($message, $code, $previous); |
|
38 | + } |
|
39 | 39 | } |