Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:service:protectedpostservice

Differences

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

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:service:protectedpostservice [2026/09/26 09:09] – admin adminscriptlog:lib:service:protectedpostservice [2026/09/26 09:34] (current) – admin admin
Line 19: Line 19:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Service | +| ''@category'' | Service | 
-  | ''@author'' | Scriptlog Team | +| ''@author'' | Scriptlog Team | 
-  | ''@license'' | MIT | +| ''@license'' | MIT | 
-  | ''@version'' | 1.0 | +| ''@version'' | 1.0 | 
-  | ''@since'' | Since Release 1.0 |+| ''@since'' | Since Release 1.0 |
  
 ======= Inheritance ======= ======= Inheritance =======
Line 34: Line 34:
 //None.// //None.//
  
-======= Properties (0) =======+======= Properties (1) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''private'' | ''(untyped)'' | ''$decryptPost'' |  | 34 |
  
 ======= Methods (3) ======= ======= Methods (3) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | Constructor. | 43 | +| public | ''__construct()'' | Constructor. | 43 | 
-  | public | ''resolve()'' | Resolve the content branch and unlocked state for a post row. | 61 | +| public | ''resolve()'' | Resolve the content branch and unlocked state for a post row. | 61 | 
-  | public | ''sanitizeContent()'' | Sanitize post content for safe output. | 107 |+| public | ''sanitizeContent()'' | Sanitize post content for safe output. | 107 |
  
  
Line 56: Line 57:
 Constructor. Constructor.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$decryptPost'' | ''?callable'' | ''null'' | Callable (int $id, string $password) => array defaulting to the global decrypt_post() helper when available. |+|  ''$decryptPost'' |  ''?callable'' |  ''null'' |  Callable (int $id, string $password) => array defaulting to the global decrypt_post() helper when available. |
  
  
Line 74: Line 75:
 HTML content for the public/unlocked branches. HTML content for the public/unlocked branches.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$post'' | ''array'' | //required// | The raw post row (requires ID, post_visibility, and post_content keys). | +|  ''$post'' |  ''array'' |  //required// |  The raw post row (requires ID, post_visibility, and post_content keys). | 
-  | ''$unlockedPosts'' | ''array'' | ''[]'' | Session store mapping post ID => password. |+|  ''$unlockedPosts'' |  ''array'' |  ''[]'' |  Session store mapping post ID => password. |
  
 **Returns:** ''(none declared)'' — array{id:int,is_protected:bool,is_unlocked:bool,show_password_form:bool,content:string} **Returns:** ''(none declared)'' — array{id:int,is_protected:bool,is_unlocked:bool,show_password_form:bool,content:string}
Line 95: Line 96:
 blacklist. Preserves the exact pipeline previously inline in single.php. blacklist. Preserves the exact pipeline previously inline in single.php.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$content'' | ''string'' | //required// | Raw, unsanitized post content. |+|  ''$content'' |  ''string'' |  //required// |  Raw, unsanitized post content. |
  
 **Returns:** ''string'' — string Sanitized HTML safe to echo into the template. **Returns:** ''string'' — string Sanitized HTML safe to echo into the template.
scriptlog/lib/service/protectedpostservice.1790413760.txt.gz · Last modified: by admin