| |
| scriptlog:lib:dao:consentdao [2026/09/26 09:09] – admin admin | scriptlog:lib:dao:consentdao [2026/09/26 09:16] (current) – admin admin |
|---|
| ======= Docblock Metadata ======= | ======= Docblock Metadata ======= |
| |
| ^ Tag ^ Value ^ | ^ Tag ^ Value ^ |
| | ''@category'' | Dao Class | | | ''@category'' | Dao 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 ======= |
| |
| ^ Relation ^ Type ^ Meaning ^ | ^ Relation ^ Type ^ Meaning ^ |
| | extends | [[scriptlog:lib:core:dao|''Dao'']] | parent class/interface | | | extends | [[scriptlog:lib:core:dao|''Dao'']] | parent class/interface | |
| |
| ======= Constants (0) ======= | ======= Constants (0) ======= |
| ======= Methods (9) ======= | ======= Methods (9) ======= |
| |
| ^ Visibility ^ Method ^ Summary ^ Line ^ | ^ Visibility ^ Method ^ Summary ^ Line ^ |
| | public | ''__construct()'' | Constructor | 27 | | | public | ''__construct()'' | Constructor | 27 | |
| | public | ''recordConsent()'' | Record a new consent | 41 | | | public | ''recordConsent()'' | Record a new consent | 41 | |
| | public | ''updateConsent()'' | Update existing consent record | 60 | | | public | ''updateConsent()'' | Update existing consent record | 60 | |
| | public | ''getLatestConsent()'' | Get latest consent by type | 76 | | | public | ''getLatestConsent()'' | Get latest consent by type | 76 | |
| | public | ''getAllConsents()'' | Get all consent records | 99 | | | public | ''getAllConsents()'' | Get all consent records | 99 | |
| | public | ''getConsentsByIp()'' | Get consent history by IP | 120 | | | public | ''getConsentsByIp()'' | Get consent history by IP | 120 | |
| | public | ''hasConsented()'' | Check if user has given consent | 148 | | | public | ''hasConsented()'' | Check if user has given consent | 148 | |
| | public | ''deleteOldConsents()'' | Delete consent records older than specified days | 176 | | | public | ''deleteOldConsents()'' | Delete consent records older than specified days | 176 | |
| | public | ''totalConsentRecords()'' | Total consent records | 193 | | | public | ''totalConsentRecords()'' | Total consent records | 193 | |
| |
| |
| Record a new consent | Record a new 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 existing consent record | Update existing consent record |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$id'' | ''(untyped)'' | //required// | //none// | | | ''$id'' | ''(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 |
| never interpolated into the query. | never interpolated into the query. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$orderBy'' | ''(untyped)'' | '''ID''' | //none// | | | ''$orderBy'' | ''(untyped)'' | '''ID''' | //none// | |
| |
| **Returns:** ''(none declared)'' — array|bool | **Returns:** ''(none declared)'' — array|bool |
| Get consent history by IP | Get consent history by IP |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$ipAddress'' | ''(untyped)'' | //required// | //none// | | | ''$ipAddress'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — array|bool | **Returns:** ''(none declared)'' — array|bool |
| an acceptance. | an acceptance. |
| |
| ^ 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 |
| Delete consent records older than specified days | Delete consent records older than specified days |
| |
| ^ 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 ^ |
| | ''Dao'' | [[scriptlog:lib:core:dao|''Scriptlog\Core\Dao'']] | | | ''Dao'' | [[scriptlog:lib:core:dao|''Scriptlog\Core\Dao'']] | |
| |
| |