PHP code example of adexos / module-gdpr

1. Go to this page and download the library: Download adexos/module-gdpr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

adexos / module-gdpr example snippets


interface I { public function execute(array $data): array; }
final class A implements I { public function execute(array $data): array { //process $data } }

final class B implements I {
    private $a;
    
    public function __construct(A $a) { $this->a = $a; }
    
    public function execute(array $data): array
    {
        $resultA = $this->a->execute($data);

        $resultB = $resultA; // transform $resultA
        
        return $resultB;
    }
}
xml
<type name="Opengento\Gdpr\Service\Export\ProcessorPool">
    <arguments>
        <argument name="array" xsi:type="array">
            <item name="my_component" xsi:type="string">\Vendor\Module\ExportProcessor</item>
        </argument>
    </arguments>
</type>
xml
<type name="Opengento\Gdpr\Service\Export\RendererPool">
    <arguments>
        <argument name="array" xsi:type="array">
            <item name="my_renderer" xsi:type="string">\Vendor\Module\ExportRenderer</item>
        </argument>
    </arguments>
</type>
xml
<type name="Opengento\Gdpr\Service\Delete\ProcessorPool">
    <arguments>
        <argument name="array" xsi:type="array">
            <item name="my_component" xsi:type="string">\Vendor\Module\DeleteProcessor</item>
        </argument>
    </arguments>
</type>
xml
<type name="Opengento\Gdpr\Service\Anonymize\ProcessorPool">
    <arguments>
        <argument name="array" xsi:type="array">
            <item name="my_component" xsi:type="string">\Vendor\Module\AnonymizeProcessor</item>
        </argument>
    </arguments>
</type>
xml
<type name="Opengento\Gdpr\Model\Config\ErasureComponentStrategy">
    <arguments>
        <argument name="componentsStrategies" xsi:type="array">
            <item name="component_name_1" xsi:type="const">Opengento\Gdpr\Service\ErasureStrategy::STRATEGY_ANONYMIZE</item>        
            <item name="component_name_2" xsi:type="const">Opengento\Gdpr\Service\ErasureStrategy::STRATEGY_DELETE</item>        
            <item name="component_name_3" xsi:type="string">custom_strategy_code</item>        
        </argument>
    </arguments>
</type>