Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:dao:commentdao

Differences

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

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:dao:commentdao [2026/09/26 09:09] – admin adminscriptlog:lib:dao:commentdao [2026/09/26 09:34] (current) – admin admin
Line 10: Line 10:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Dao Class | +| ''@category'' | Dao Class | 
-  | ''@author'' | M.Noermoehammad | +| ''@author'' | M.Noermoehammad | 
-  | ''@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) =======
Line 26: Line 26:
 //None.// //None.//
  
-======= Properties (0) =======+======= Properties (1) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''private'' | ''(untyped)'' | ''$selected'' |  | 22 |
  
 ======= Methods (18) ======= ======= Methods (18) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | Constructor | 28 | +| public | ''__construct()'' | Constructor | 28 | 
-  | public | ''findComments()'' | Find Comments | 46 | +| public | ''findComments()'' | Find Comments | 46 | 
-  | public | ''findApprovedCommentsPaginated()'' | Find approved comments with pagination for API | 85 | +| public | ''findApprovedCommentsPaginated()'' | Find approved comments with pagination for API | 85 | 
-  | public | ''countApprovedComments()'' | Count approved comments | 123 | +| public | ''countApprovedComments()'' | Count approved comments | 123 | 
-  | public | ''findComment()'' | Find Comment | 149 | +| public | ''findComment()'' | Find Comment | 149 | 
-  | public | ''updateComment()'' | Update Comment | 178 | +| public | ''updateComment()'' | Update Comment | 178 | 
-  | public | ''deleteComment()'' | DeleteComment | 201 | +| public | ''deleteComment()'' | DeleteComment | 201 | 
-  | public | ''anonymizeComment()'' | Anonymize comment by replacing author info | 218 | +| public | ''anonymizeComment()'' | Anonymize comment by replacing author info | 218 | 
-  | public | ''anonymizeCommentsByEmail()'' | Anonymize all comments by user email | 241 | +| public | ''anonymizeCommentsByEmail()'' | Anonymize all comments by user email | 241 | 
-  | public | ''checkCommentId()'' | CheckCommentId | 267 | +| public | ''checkCommentId()'' | CheckCommentId | 267 | 
-  | public | ''dropDownCommentStatement()'' | DropDownCommentStatement | 284 | +| public | ''dropDownCommentStatement()'' | DropDownCommentStatement | 284 | 
-  | public | ''totalCommentRecords()'' | TotalCommentRecords | 306 | +| public | ''totalCommentRecords()'' | TotalCommentRecords | 306 | 
-  | public | ''countReplies()'' | Count Replies for a Comment | 319 | +| public | ''countReplies()'' | Count Replies for a Comment | 319 | 
-  | public | ''findCommentWithPost()'' | Find a single comment with post info (no sanitize required). | 333 | +| public | ''findCommentWithPost()'' | Find a single comment with post info (no sanitize required). | 333 | 
-  | public | ''insertCommentApi()'' | Insert a comment with the given data and return the new ID. | 349 | +| public | ''insertCommentApi()'' | Insert a comment with the given data and return the new ID. | 349 | 
-  | public | ''updateCommentApi()'' | Update specific comment fields. | 362 | +| public | ''updateCommentApi()'' | Update specific comment fields. | 362 | 
-  | public | ''deleteCommentWithReplies()'' | Delete replies for a comment, then the comment itself. | 373 | +| public | ''deleteCommentWithReplies()'' | Delete replies for a comment, then the comment itself. | 373 | 
-  | public | ''getPostCommentStatus()'' | Get comment_status for a post. | 385 |+| public | ''getPostCommentStatus()'' | Get comment_status for a post. | 385 |
  
  
Line 80: Line 81:
 into memory and filtered in PHP). into memory and filtered in PHP).
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$orderBy'' | ''(untyped)'' | '''ID''' | -- default order By Id | +|  ''$orderBy'' |  ''(untyped)'' |  '''ID''' |  -- default order By Id | 
-  | ''$email'' | ''(untyped)'' | ''null'' | -- optional comment author email filter |+|  ''$email'' |  ''(untyped)'' |  ''null'' |  -- optional comment author email filter |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 97: Line 98:
 Find approved comments with pagination for API Find approved comments with pagination for API
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$limit'' | ''(untyped)'' | //required// | //none// | +|  ''$limit'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$offset'' | ''(untyped)'' | //required// | //none// | +|  ''$offset'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$sortBy'' | ''(untyped)'' | '''ID''' | //none// | +|  ''$sortBy'' |  ''(untyped)'' |  '''ID''' |  //none// | 
-  | ''$sortOrder'' | ''(untyped)'' | '''DESC''' | //none// | +|  ''$sortOrder'' |  ''(untyped)'' |  '''DESC''' |  //none// | 
-  | ''$postId'' | ''(untyped)'' | ''null'' | //none// |+|  ''$postId'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 117: Line 118:
 Count approved comments Count approved comments
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$postId'' | ''(untyped)'' | ''null'' | //none// |+|  ''$postId'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — integer **Returns:** ''(none declared)'' — integer
Line 133: Line 134:
 Find Comment Find Comment
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// | //none// | +|  ''$id'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$sanitize'' | ''(untyped)'' | //required// | //none// |+|  ''$sanitize'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 150: Line 151:
 Update Comment Update Comment
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$sanitize'' | ''(untyped)'' | //required// | //none// | +|  ''$sanitize'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$bind'' | ''(untyped)'' | //required// | //none// | +|  ''$bind'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$ID'' | ''(untyped)'' | //required// | //none// |+|  ''$ID'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 168: Line 169:
 DeleteComment DeleteComment
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// | //none// | +|  ''$id'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$sanitize'' | ''(untyped)'' | //required// | //none// |+|  ''$sanitize'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 187: Line 188:
 Used for GDPR data deletion (Right to be Forgotten) Used for GDPR data deletion (Right to be Forgotten)
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$commentId'' | ''(untyped)'' | //required// | //none// |+|  ''$commentId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 203: Line 204:
 Anonymize all comments by user email Anonymize all comments by user email
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$email'' | ''(untyped)'' | //required// | //none// |+|  ''$email'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 219: Line 220:
 CheckCommentId CheckCommentId
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// | //none// | +|  ''$id'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$sanitize'' | ''(untyped)'' | //required// | //none// |+|  ''$sanitize'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — integer|numeric **Returns:** ''(none declared)'' — integer|numeric
Line 236: Line 237:
 DropDownCommentStatement DropDownCommentStatement
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$selected'' | ''(untyped)'' | '''''' | //none// |+|  ''$selected'' |  ''(untyped)'' |  '''''' |  //none// |
  
 **Returns:** ''(none declared)'' — mixed **Returns:** ''(none declared)'' — mixed
Line 252: Line 253:
 TotalCommentRecords TotalCommentRecords
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$data'' | ''(untyped)'' | ''null'' | //none// |+|  ''$data'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — numeric|int **Returns:** ''(none declared)'' — numeric|int
Line 268: Line 269:
 Count Replies for a Comment Count Replies for a Comment
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$commentId'' | ''(untyped)'' | //required// | //none// |+|  ''$commentId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — int **Returns:** ''(none declared)'' — int
Line 284: Line 285:
 Find a single comment with post info (no sanitize required). Find a single comment with post info (no sanitize required).
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$commentId'' | ''(untyped)'' | //required// | //none// |+|  ''$commentId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — array|false **Returns:** ''(none declared)'' — array|false
Line 300: Line 301:
 Insert a comment with the given data and return the new ID. Insert a comment with the given data and return the new ID.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$data'' | ''array'' | //required// | //none// |+|  ''$data'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — int **Returns:** ''(none declared)'' — int
Line 316: Line 317:
 Update specific comment fields. Update specific comment fields.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$commentId'' | ''(untyped)'' | //required// | //none// | +|  ''$commentId'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$data'' | ''array'' | //required// | //none// |+|  ''$data'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 333: Line 334:
 Delete replies for a comment, then the comment itself. Delete replies for a comment, then the comment itself.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$commentId'' | ''(untyped)'' | //required// | //none// |+|  ''$commentId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 349: Line 350:
 Get comment_status for a post. Get comment_status for a post.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$postId'' | ''(untyped)'' | //required// | //none// |+|  ''$postId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — string|null **Returns:** ''(none declared)'' — string|null
Line 356: Line 357:
 ======= 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'']] |
  
  
scriptlog/lib/dao/commentdao.1790413760.txt.gz · Last modified: by admin