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
| Tag | Value |
|---|---|
@category | Controller Class |
@author | Scriptlog |
@license | MIT |
@version | 1.0 |
@since | Since Release 1.0 |
| Relation | Type | Meaning |
|---|---|---|
| extends | ''ApiController'' | parent class/interface |
None.
| Visibility | Type | Name | Default | Line |
|---|---|---|---|---|
private | (untyped) | $consentDao | 32 | |
private | (untyped) | $consentService | 38 | |
private | (untyped) | $hateoas | 43 |
| 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 |
public function __construct()
lines 48–62 (15)
Constructor
Takes no parameters.
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)
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)
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
| 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.