| Next revision | Previous revision |
| scriptlog:lib:service:consentservice [2026/09/26 09:09] – admin admin | scriptlog:lib:service:consentservice [2026/09/26 09:34] (current) – admin admin |
|---|
| ======= Docblock Metadata ======= | ======= Docblock Metadata ======= |
| |
| ^ Tag ^ Value ^ | ^ Tag ^ Value ^ |
| | ''@category'' | Service class | | | ''@category'' | Service class | |
| | ''@author'' | Scriptlog | | | ''@author'' | Scriptlog | |
| | ''@license'' | MIT | | | ''@license'' | MIT | |
| | ''@version'' | 1.0 | | | ''@version'' | 1.0 | |
| | ''@since'' | Since Release 1.0 | | | ''@since'' | Since Release 1.0 | |
| |
| ======= Inheritance ======= | ======= Inheritance ======= |
| //None.// | //None.// |
| |
| ======= Properties (0) ======= | ======= Properties (5) ======= |
| |
| //None declared.// | ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ |
| | | ''private'' | ''(untyped)'' | ''$consentType'' | | 28 | |
| | | ''private'' | ''(untyped)'' | ''$consentStatus'' | | 34 | |
| | | ''private'' | ''(untyped)'' | ''$ipAddress'' | | 40 | |
| | | ''private'' | ''(untyped)'' | ''$userAgent'' | | 46 | |
| | | ''private'' | ''(untyped)'' | ''$consentDao'' | | 52 | |
| |
| ======= Methods (9) ======= | ======= Methods (9) ======= |
| |
| ^ Visibility ^ Method ^ Summary ^ Line ^ | ^ Visibility ^ Method ^ Summary ^ Line ^ |
| | public | ''__construct()'' | Constructor | 59 | | | public | ''__construct()'' | Constructor | 59 | |
| | public | ''recordConsent()'' | Record user consent | 73 | | | public | ''recordConsent()'' | Record user consent | 73 | |
| | public | ''updateConsent()'' | Update user consent | 95 | | | public | ''updateConsent()'' | Update user consent | 95 | |
| | public | ''getLatestConsent()'' | Get latest consent by type | 106 | | | public | ''getLatestConsent()'' | Get latest consent by type | 106 | |
| | public | ''getAllConsents()'' | Get all consent records | 116 | | | public | ''getAllConsents()'' | Get all consent records | 116 | |
| | public | ''hasConsented()'' | Check if user has given consent | 131 | | | public | ''hasConsented()'' | Check if user has given consent | 131 | |
| | public | ''processCookieConsent()'' | Process cookie consent from user | 142 | | | public | ''processCookieConsent()'' | Process cookie consent from user | 142 | |
| | public | ''isCookieConsentAccepted()'' | Get cookie consent status | 157 | | | public | ''isCookieConsentAccepted()'' | Get cookie consent status | 157 | |
| | public | ''cleanOldConsents()'' | Clean old consent records | 174 | | | public | ''cleanOldConsents()'' | Clean old consent records | 174 | |
| |
| |
| Constructor | Constructor |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$consentDao'' | [[scriptlog:lib:dao:consentdao|''ConsentDao'']] | //required// | //none// | | | ''$consentDao'' | [[scriptlog:lib:dao:consentdao|''ConsentDao'']] | //required// | //none// | |
| |
| |
| Record user consent | Record user consent |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$consentType'' | ''(untyped)'' | //required// | //none// | | | ''$consentType'' | ''(untyped)'' | //required// | //none// | |
| | ''$consentStatus'' | ''(untyped)'' | //required// | //none// | | | ''$consentStatus'' | ''(untyped)'' | //required// | //none// | |
| | ''$ipAddress'' | ''(untyped)'' | //required// | //none// | | | ''$ipAddress'' | ''(untyped)'' | //required// | //none// | |
| | ''$userAgent'' | ''(untyped)'' | ''null'' | //none// | | | ''$userAgent'' | ''(untyped)'' | ''null'' | //none// | |
| |
| **Returns:** ''(none declared)'' — int|bool | **Returns:** ''(none declared)'' — int|bool |
| Update user consent | Update user consent |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$consentId'' | ''(untyped)'' | //required// | //none// | | | ''$consentId'' | ''(untyped)'' | //required// | //none// | |
| | ''$consentStatus'' | ''(untyped)'' | //required// | //none// | | | ''$consentStatus'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — bool | **Returns:** ''(none declared)'' — bool |
| Get latest consent by type | Get latest consent by type |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$consentType'' | ''(untyped)'' | //required// | //none// | | | ''$consentType'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — array|bool | **Returns:** ''(none declared)'' — array|bool |
| without one the check falls back to the site-global record (legacy). | without one the check falls back to the site-global record (legacy). |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$consentType'' | ''(untyped)'' | //required// | //none// | | | ''$consentType'' | ''(untyped)'' | //required// | //none// | |
| | ''$ipAddress'' | ''(untyped)'' | ''null'' | //none// | | | ''$ipAddress'' | ''(untyped)'' | ''null'' | //none// | |
| |
| **Returns:** ''(none declared)'' — bool | **Returns:** ''(none declared)'' — bool |
| Process cookie consent from user | Process cookie consent from user |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$status'' | ''(untyped)'' | //required// | 'accepted' or 'rejected' | | | ''$status'' | ''(untyped)'' | //required// | 'accepted' or 'rejected' | |
| |
| **Returns:** ''(none declared)'' — bool | **Returns:** ''(none declared)'' — bool |
| Clean old consent records | Clean old consent records |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$days'' | ''(untyped)'' | ''365'' | //none// | | | ''$days'' | ''(untyped)'' | ''365'' | //none// | |
| |
| **Returns:** ''(none declared)'' — bool | **Returns:** ''(none declared)'' — bool |
| ======= Imports ======= | ======= Imports ======= |
| |
| ^ Alias ^ Fully-qualified name ^ | ^ Alias ^ Fully-qualified name ^ |
| | ''ConsentDao'' | [[scriptlog:lib:dao:consentdao|''Scriptlog\Dao\ConsentDao'']] | | | ''ConsentDao'' | [[scriptlog:lib:dao:consentdao|''Scriptlog\Dao\ConsentDao'']] | |
| |
| |