Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:controller:commentsapicontroller

Differences

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

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:controller:commentsapicontroller [2026/09/26 09:09] – admin adminscriptlog:lib:controller:commentsapicontroller [2026/09/26 09:34] (current) – admin admin
Line 14: Line 14:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Controller Class | +| ''@category'' | Controller Class | 
-  | ''@author'' | Blogware Team | +| ''@author'' | Blogware Team | 
-  | ''@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:controller:apicontroller|''ApiController'']] | parent class/interface |+| extends | [[scriptlog:lib:controller:apicontroller|''ApiController'']] | parent class/interface |
  
 ======= Constants (0) ======= ======= Constants (0) =======
Line 30: Line 30:
 //None.// //None.//
  
-======= Properties (0) =======+======= Properties (4) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''private'' | ''(untyped)'' | ''$commentDao'' |  | 34 | 
 +| ''private'' | ''(untyped)'' | ''$commentService'' |  | 39 | 
 +| ''private'' | ''(untyped)'' | ''$sanitizer'' |  | 44 | 
 +| ''private'' | ''(untyped)'' | ''$hateoas'' |  | 49 |
  
 ======= Methods (7) ======= ======= Methods (7) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | Constructor | 54 | +| public | ''__construct()'' | Constructor | 54 | 
-  | public | ''index()'' | Get all approved comments (public endpoint) | 75 | +| public | ''index()'' | Get all approved comments (public endpoint) | 75 | 
-  | public | ''show()'' | Get a single comment by ID (public endpoint) | 130 | +| public | ''show()'' | Get a single comment by ID (public endpoint) | 130 | 
-  | public | ''store()'' | Create a new comment (public endpoint - for visitors) | 172 | +| public | ''store()'' | Create a new comment (public endpoint - for visitors) | 172 | 
-  | public | ''update()'' | Update a comment (requires authentication) | 247 | +| public | ''update()'' | Update a comment (requires authentication) | 247 | 
-  | public | ''destroy()'' | Delete a comment (requires authentication) | 312 | +| public | ''destroy()'' | Delete a comment (requires authentication) | 312 | 
-  | private | ''getClientIp()'' | Get client IP address | 353 |+| private | ''getClientIp()'' | Get client IP address | 353 |
  
  
Line 71: Line 75:
 GET /api/v1/comments GET /api/v1/comments
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | Query parameters |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  Query parameters |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 89: Line 93:
 GET /api/v1/comments/{id} GET /api/v1/comments/{id}
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | Route parameters including 'id' |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  Route parameters including 'id' |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 107: Line 111:
 POST /api/v1/comments POST /api/v1/comments
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$_params'' | ''(untyped)'' | ''[]'' | //none// |+|  ''$_params'' |  ''(untyped)'' |  ''[]'' |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 125: Line 129:
 PUT /api/v1/comments/{id} PUT /api/v1/comments/{id}
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | Route parameters including 'id' |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  Route parameters including 'id' |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 143: Line 147:
 DELETE /api/v1/comments/{id} DELETE /api/v1/comments/{id}
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | Route parameters including 'id' |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  Route parameters including 'id' |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 165: Line 169:
 ======= Imports ======= ======= Imports =======
  
-  ^ Alias ^ Fully-qualified name ^ +^ Alias ^ Fully-qualified name ^ 
-  | ''ApiController'' | [[scriptlog:lib:controller:apicontroller|''Scriptlog\Controller\ApiController'']] | +| ''ApiController'' | [[scriptlog:lib:controller:apicontroller|''Scriptlog\Controller\ApiController'']] | 
-  | ''ApiHateoas'' | [[scriptlog:lib:core:apihateoas|''Scriptlog\Core\ApiHateoas'']] | +| ''ApiHateoas'' | [[scriptlog:lib:core:apihateoas|''Scriptlog\Core\ApiHateoas'']] | 
-  | ''ApiResponse'' | [[scriptlog:lib:core:apiresponse|''Scriptlog\Core\ApiResponse'']] | +| ''ApiResponse'' | [[scriptlog:lib:core:apiresponse|''Scriptlog\Core\ApiResponse'']] | 
-  | ''FormValidator'' | [[scriptlog:lib:core:formvalidator|''Scriptlog\Core\FormValidator'']] | +| ''FormValidator'' | [[scriptlog:lib:core:formvalidator|''Scriptlog\Core\FormValidator'']] | 
-  | ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] | +| ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] | 
-  | ''CommentDao'' | [[scriptlog:lib:dao:commentdao|''Scriptlog\Dao\CommentDao'']] | +| ''CommentDao'' | [[scriptlog:lib:dao:commentdao|''Scriptlog\Dao\CommentDao'']] | 
-  | ''CommentApiDto'' | [[scriptlog:lib:dto:commentapidto|''Scriptlog\Dto\Api\CommentApiDto'']] | +| ''CommentApiDto'' | [[scriptlog:lib:dto:commentapidto|''Scriptlog\Dto\Api\CommentApiDto'']] | 
-  | ''CommentService'' | [[scriptlog:lib:service:commentservice|''Scriptlog\Service\CommentService'']] |+| ''CommentService'' | [[scriptlog:lib:service:commentservice|''Scriptlog\Service\CommentService'']] |
  
  
scriptlog/lib/controller/commentsapicontroller.1790413760.txt.gz · Last modified: by admin