Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:service:consentservice

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:service:consentservice [2026/09/26 09:09] – admin adminscriptlog:lib:service:consentservice [2026/09/26 09:34] (current) – admin admin
Line 12: Line 12:
 ======= 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 =======
Line 27: Line 27:
 //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 |
  
  
Line 55: Line 60:
 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// |
  
  
Line 69: Line 74:
 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
Line 88: Line 93:
 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
Line 105: Line 110:
 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
Line 139: Line 144:
 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
Line 156: Line 161:
 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
Line 187: Line 192:
 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
Line 194: Line 199:
 ======= 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'']] |
  
  
scriptlog/lib/service/consentservice.1790413760.txt.gz · Last modified: by admin