Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:controller:protectedpostapicontroller

Differences

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

Link to this comparison view

scriptlog:lib:controller:protectedpostapicontroller [2026/09/26 09:09] – admin adminscriptlog:lib:controller:protectedpostapicontroller [2026/09/26 09:16] (current) – admin admin
Line 10: Line 10:
 ======= 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 23: Line 23:
 ======= Methods (5) ======= ======= Methods (5) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | Constructor | 30 | +| public | ''__construct()'' | Constructor | 30 | 
-  | private | ''respondWithHtmxFallback()'' | Respond with HTMX fragment or API JSON, depending on request type. | 46 | +| private | ''respondWithHtmxFallback()'' | Respond with HTMX fragment or API JSON, depending on request type. | 46 | 
-  | private | ''sendError()'' | Send an error response via HTMX or API JSON. | 70 | +| private | ''sendError()'' | Send an error response via HTMX or API JSON. | 70 | 
-  | public | ''unlock()'' | Unlock password-protected post | 87 | +| public | ''unlock()'' | Unlock password-protected post | 87 | 
-  | public | ''verify()'' | Verify post password (lightweight check) | 172 |+| public | ''verify()'' | Verify post password (lightweight check) | 172 |
  
  
Line 54: Line 54:
 Respond with HTMX fragment or API JSON, depending on request type. Respond with HTMX fragment or API JSON, depending on request type.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$htmxFragment'' | ''(untyped)'' | //required// | //none// | +|  ''$htmxFragment'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$htmxData'' | ''(untyped)'' | //required// | //none// | +|  ''$htmxData'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$apiData'' | ''(untyped)'' | ''null'' | //none// | +|  ''$apiData'' |  ''(untyped)'' |  ''null'' |  //none// | 
-  | ''$statusCode'' | ''(untyped)'' | ''200'' | //none// | +|  ''$statusCode'' |  ''(untyped)'' |  ''200'' |  //none// | 
-  | ''$apiErrorCode'' | ''(untyped)'' | ''null'' | //none// |+|  ''$apiErrorCode'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — bool True if HTMX response was sent **Returns:** ''(none declared)'' — bool True if HTMX response was sent
Line 74: Line 74:
 Send an error response via HTMX or API JSON. Send an error response via HTMX or API JSON.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$message'' | ''(untyped)'' | //required// | //none// | +|  ''$message'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$statusCode'' | ''(untyped)'' | ''400'' | //none// | +|  ''$statusCode'' |  ''(untyped)'' |  ''400'' |  //none// | 
-  | ''$errorCode'' | ''(untyped)'' | ''null'' | //none// |+|  ''$errorCode'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 94: Line 94:
 POST /api/v1/posts/{id}/unlock POST /api/v1/posts/{id}/unlock
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | URL parameters (post ID) |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  URL parameters (post ID) |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 112: Line 112:
 POST /api/v1/posts/{id}/verify POST /api/v1/posts/{id}/verify
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | URL parameters (post ID) |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  URL parameters (post ID) |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 119: Line 119:
 ======= 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'']] | 
-  | ''ApiResponse'' | [[scriptlog:lib:core:apiresponse|''Scriptlog\Core\ApiResponse'']] |+| ''ApiResponse'' | [[scriptlog:lib:core:apiresponse|''Scriptlog\Core\ApiResponse'']] |
  
  
scriptlog/lib/controller/protectedpostapicontroller.1790413760.txt.gz · Last modified: by admin