@@ -23,67 +23,67 @@ |
||
| 23 | 23 | class PersonalDataExporterManager |
| 24 | 24 | { |
| 25 | 25 | |
| 26 | - public function __construct() |
|
| 27 | - { |
|
| 28 | - add_filter( |
|
| 29 | - 'wp_privacy_personal_data_exporters', |
|
| 30 | - array($this, 'hookInExporters') |
|
| 31 | - ); |
|
| 32 | - } |
|
| 26 | + public function __construct() |
|
| 27 | + { |
|
| 28 | + add_filter( |
|
| 29 | + 'wp_privacy_personal_data_exporters', |
|
| 30 | + array($this, 'hookInExporters') |
|
| 31 | + ); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Adds EE's exporters to the list of WP exporters |
|
| 37 | - * @param array $exporters |
|
| 38 | - * @return array |
|
| 39 | - */ |
|
| 40 | - public function hookInExporters($exporters) |
|
| 41 | - { |
|
| 42 | - // load all the privacy policy stuff |
|
| 43 | - // add post policy text |
|
| 44 | - foreach ($this->loadPrivateDataExporterCollection() as $exporter) { |
|
| 45 | - $exporters[] = array( |
|
| 46 | - 'exporter_friendly_name' => $exporter->name(), |
|
| 47 | - 'callback' => array($exporter,'export') |
|
| 48 | - ); |
|
| 49 | - } |
|
| 50 | - return $exporters; |
|
| 51 | - } |
|
| 35 | + /** |
|
| 36 | + * Adds EE's exporters to the list of WP exporters |
|
| 37 | + * @param array $exporters |
|
| 38 | + * @return array |
|
| 39 | + */ |
|
| 40 | + public function hookInExporters($exporters) |
|
| 41 | + { |
|
| 42 | + // load all the privacy policy stuff |
|
| 43 | + // add post policy text |
|
| 44 | + foreach ($this->loadPrivateDataExporterCollection() as $exporter) { |
|
| 45 | + $exporters[] = array( |
|
| 46 | + 'exporter_friendly_name' => $exporter->name(), |
|
| 47 | + 'callback' => array($exporter,'export') |
|
| 48 | + ); |
|
| 49 | + } |
|
| 50 | + return $exporters; |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @return CollectionInterface|PersonalDataExporterInterface[] |
|
| 56 | - * @throws InvalidIdentifierException |
|
| 57 | - * @throws InvalidInterfaceException |
|
| 58 | - * @throws InvalidFilePathException |
|
| 59 | - * @throws InvalidEntityException |
|
| 60 | - * @throws InvalidDataTypeException |
|
| 61 | - * @throws InvalidClassException |
|
| 62 | - */ |
|
| 63 | - protected function loadPrivateDataExporterCollection() |
|
| 64 | - { |
|
| 65 | - $loader = new CollectionLoader( |
|
| 66 | - new CollectionDetails( |
|
| 67 | - // collection name |
|
| 68 | - 'personal_data_exporters', |
|
| 69 | - // collection interface |
|
| 70 | - 'EventEspresso\core\services\privacy\export\PersonalDataExporterInterface', |
|
| 71 | - // FQCNs for classes to add (all classes within that namespace will be loaded) |
|
| 72 | - apply_filters( |
|
| 73 | - 'FHEE__EventEspresso_core_services_privacy_export_PersonalDataExporterManager__exporters', |
|
| 74 | - array('EventEspresso\core\domain\services\admin\privacy\export') |
|
| 75 | - ), |
|
| 76 | - // filepaths to classes to add |
|
| 77 | - array(), |
|
| 78 | - // file mask to use if parsing folder for files to add |
|
| 79 | - '', |
|
| 80 | - // what to use as identifier for collection entities |
|
| 81 | - // using CLASS NAME prevents duplicates (works like a singleton) |
|
| 82 | - CollectionDetails::ID_CLASS_NAME |
|
| 83 | - ) |
|
| 84 | - ); |
|
| 85 | - return $loader->getCollection(); |
|
| 86 | - } |
|
| 54 | + /** |
|
| 55 | + * @return CollectionInterface|PersonalDataExporterInterface[] |
|
| 56 | + * @throws InvalidIdentifierException |
|
| 57 | + * @throws InvalidInterfaceException |
|
| 58 | + * @throws InvalidFilePathException |
|
| 59 | + * @throws InvalidEntityException |
|
| 60 | + * @throws InvalidDataTypeException |
|
| 61 | + * @throws InvalidClassException |
|
| 62 | + */ |
|
| 63 | + protected function loadPrivateDataExporterCollection() |
|
| 64 | + { |
|
| 65 | + $loader = new CollectionLoader( |
|
| 66 | + new CollectionDetails( |
|
| 67 | + // collection name |
|
| 68 | + 'personal_data_exporters', |
|
| 69 | + // collection interface |
|
| 70 | + 'EventEspresso\core\services\privacy\export\PersonalDataExporterInterface', |
|
| 71 | + // FQCNs for classes to add (all classes within that namespace will be loaded) |
|
| 72 | + apply_filters( |
|
| 73 | + 'FHEE__EventEspresso_core_services_privacy_export_PersonalDataExporterManager__exporters', |
|
| 74 | + array('EventEspresso\core\domain\services\admin\privacy\export') |
|
| 75 | + ), |
|
| 76 | + // filepaths to classes to add |
|
| 77 | + array(), |
|
| 78 | + // file mask to use if parsing folder for files to add |
|
| 79 | + '', |
|
| 80 | + // what to use as identifier for collection entities |
|
| 81 | + // using CLASS NAME prevents duplicates (works like a singleton) |
|
| 82 | + CollectionDetails::ID_CLASS_NAME |
|
| 83 | + ) |
|
| 84 | + ); |
|
| 85 | + return $loader->getCollection(); |
|
| 86 | + } |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | // End of file PersonalDataExporterManager.php |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | foreach ($this->loadPrivateDataExporterCollection() as $exporter) { |
| 45 | 45 | $exporters[] = array( |
| 46 | 46 | 'exporter_friendly_name' => $exporter->name(), |
| 47 | - 'callback' => array($exporter,'export') |
|
| 47 | + 'callback' => array($exporter, 'export') |
|
| 48 | 48 | ); |
| 49 | 49 | } |
| 50 | 50 | return $exporters; |