This is an old revision of the document!
Table of Contents
GdprApiController
Layer: Controller · Source: lib/controller/api/GdprApiController.php:26 (lines 26–160)
class GdprApiController extends ApiController
GDPR API Controller
Handles GDPR-related API endpoints including consent management
Docblock Metadata
| Tag | Value |
|---|---|
@category | Controller Class |
@author | Scriptlog |
@license | MIT |
@version | 1.0 |
@since | Since Release 1.0 |
Inheritance
| Relation | Type | Meaning |
|---|---|---|
| extends | ''ApiController'' | parent class/interface |
Constants (0)
None.
Properties (0)
None declared.
Methods (4)
| Visibility | Method | Summary | Line |
|---|---|---|---|
| public | __construct() | Constructor | 48 |
| public | consent() | Process cookie consent | 71 |
| public | getConsentStatus() | Get consent status | 118 |
| private | getClientIp() | Get client IP address | 152 |
__construct()
public function __construct()
lines 48–62 (15)
Constructor
Takes no parameters.
consent()
public function consent($_params = [])
lines 71–109 (39)
Process cookie consent
POST /api/v1/gdpr/consent
| Parameter | Type | Default | Description |
|---|---|---|---|
$_params | (untyped) | [] | none |
Returns: (none declared)
getConsentStatus()
public function getConsentStatus($_params = [])
lines 118–142 (25)
Get consent status
GET /api/v1/gdpr/consent
| Parameter | Type | Default | Description |
|---|---|---|---|
$_params | (untyped) | [] | none |
Returns: (none declared)
getClientIp()
private function getClientIp()
lines 152–159 (8)
Get client IP address
Delegates to the shared get_ip_address() helper so proxy headers are only trusted when the request actually came through Cloudflare.
Takes no parameters.
Returns: (none declared) — string
Imports
| Alias | Fully-qualified name |
|---|---|
ApiController | ''Scriptlog\Controller\ApiController'' |
ApiHateoas | ''Scriptlog\Core\ApiHateoas'' |
ApiResponse | ''Scriptlog\Core\ApiResponse'' |
ConsentDao | ''Scriptlog\Dao\ConsentDao'' |
ConsentService | ''Scriptlog\Service\ConsentService'' |
This page is generated from source by 'tools/gendoc'. Edits will be overwritten.
