PHP code example of azaharizaman / nexus-gdpr

1. Go to this page and download the library: Download azaharizaman/nexus-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/ */

    

azaharizaman / nexus-gdpr example snippets


use Nexus\GDPR\Services\GdprComplianceService;
use Nexus\DataPrivacy\ValueObjects\DataSubjectRequest;

$service = new GdprComplianceService($requestManager);

// Get deadline for DSAR (30 calendar days)
$deadline = $service->calculateDeadline($request);

// Check if extension is allowed (up to 2 months for complex requests)
$canExtend = $service->canExtendDeadline($request);

use Nexus\GDPR\Services\GdprBreachService;

$service = new GdprBreachService($breachManager);

// Calculate 72-hour notification deadline
$deadline = $service->getNotificationDeadline($breach);

// Check if notification is overdue
$isOverdue = $service->isNotificationOverdue($breach);

use Nexus\GDPR\Services\LawfulBasisValidator;
use Nexus\DataPrivacy\Enums\LawfulBasisType;

$validator = new LawfulBasisValidator();

// Validate processing activity has valid lawful basis
$isValid = $validator->validate($processingActivity);

// Check if consent is 

// Register GDPR-specific handlers
$registry = new RequestHandlerRegistry();
$registry->register(new GdprAccessRequestHandler($gdprService));

// Validate GDPR compliance
$complianceService->validateGdprCompliance($request);