Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:service:postapplicationservice

Differences

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

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:service:postapplicationservice [2026/09/26 09:09] – admin adminscriptlog:lib:service:postapplicationservice [2026/09/26 09:34] (current) – admin admin
Line 17: Line 17:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Service | +| ''@category'' | Service | 
-  | ''@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 =======
Line 32: Line 32:
 //None.// //None.//
  
-======= Properties (0) =======+======= Properties (1) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''private'' | ''(untyped)'' | ''$postService'' |  | 29 |
  
 ======= Methods (10) ======= ======= Methods (10) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | Constructor. | 36 | +| public | ''__construct()'' | Constructor. | 36 | 
-  | public | ''createPost()'' | Create a new post. | 57 | +| public | ''createPost()'' | Create a new post. | 57 | 
-  | public | ''updatePost()'' | Update an existing post. | 122 | +| public | ''updatePost()'' | Update an existing post. | 122 | 
-  | private | ''getPostFilters()'' | Return filter definitions for new-post form. | 206 | +| private | ''getPostFilters()'' | Return filter definitions for new-post form. | 206 | 
-  | private | ''getPostUpdateFilters()'' | Return filter definitions for edit-post form. | 230 | +| private | ''getPostUpdateFilters()'' | Return filter definitions for edit-post form. | 230 | 
-  | private | ''setPostServiceData()'' | Populate PostService fields for a new post. | 258 | +| private | ''setPostServiceData()'' | Populate PostService fields for a new post. | 258 | 
-  | private | ''setProtectedPostContent()'' | Handle protected-post content re-encryption for updates. | 326 | +| private | ''setProtectedPostContent()'' | Handle protected-post content re-encryption for updates. | 326 | 
-  | private | ''setPostHeadlines()'' | Set post headline flag (featured / not featured). | 362 | +| private | ''setPostHeadlines()'' | Set post headline flag (featured / not featured). | 362 | 
-  | private | ''resolvePostDate()'' | Resolve the post publication datetime in site timezone. | 381 | +| private | ''resolvePostDate()'' | Resolve the post publication datetime in site timezone. | 381 | 
-  | private | ''normalizePostStatus()'' | Normalize a submitted post status against its publication datetime. | 397 |+| private | ''normalizePostStatus()'' | Normalize a submitted post status against its publication datetime. | 397 |
  
  
Line 61: Line 62:
 Constructor. Constructor.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$postService'' | [[scriptlog:lib:service:postservice|''PostService'']] | //required// | //none// |+|  ''$postService'' |  [[scriptlog:lib:service:postservice|''PostService'']] |  //required// |  //none// |
  
  
Line 78: Line 79:
 PostService field population and the final addPost() call. PostService field population and the final addPost() call.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$file_location'' | ''(untyped)'' | //required// | //none// | +|  ''$file_location'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_type'' | ''(untyped)'' | //required// | //none// | +|  ''$file_type'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_name'' | ''(untyped)'' | //required// | //none// | +|  ''$file_name'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_size'' | ''(untyped)'' | //required// | //none// | +|  ''$file_size'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_extension'' | ''(untyped)'' | //required// | //none// | +|  ''$file_extension'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$new_filename'' | ''(untyped)'' | //required// | //none// | +|  ''$new_filename'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$user_level'' | ''(untyped)'' | //required// | //none// | +|  ''$user_level'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$filtered'' | ''?array'' | ''null'' | Pre-distilled data; computed from $_POST when null |+|  ''$filtered'' |  ''?array'' |  ''null'' |  Pre-distilled data; computed from $_POST when null |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 105: Line 106:
 and the final modifyPost() call. and the final modifyPost() call.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// | //none// | +|  ''$id'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_location'' | ''(untyped)'' | //required// | //none// | +|  ''$file_location'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_type'' | ''(untyped)'' | //required// | //none// | +|  ''$file_type'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_name'' | ''(untyped)'' | //required// | //none// | +|  ''$file_name'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_size'' | ''(untyped)'' | //required// | //none// | +|  ''$file_size'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_extension'' | ''(untyped)'' | //required// | //none// | +|  ''$file_extension'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$new_filename'' | ''(untyped)'' | //required// | //none// | +|  ''$new_filename'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$user_level'' | ''(untyped)'' | //required// | //none// | +|  ''$user_level'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$oldMediaId'' | ''(untyped)'' | ''null'' | //none// | +|  ''$oldMediaId'' |  ''(untyped)'' |  ''null'' |  //none// | 
-  | ''$filtered'' | ''?array'' | ''null'' | Pre-distilled data; computed from $_POST when null |+|  ''$filtered'' |  ''?array'' |  ''null'' |  Pre-distilled data; computed from $_POST when null |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 160: Line 161:
 Populate PostService fields for a new post. Populate PostService fields for a new post.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$filters'' | ''(untyped)'' | //required// | //none// | +|  ''$filters'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$filtered'' | ''?array'' | ''null'' | //none// |+|  ''$filtered'' |  ''?array'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 182: Line 183:
 3. visibility ≠ protected → store plain content 3. visibility ≠ protected → store plain content
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// | //none// | +|  ''$id'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$filters'' | ''(untyped)'' | //required// | //none// | +|  ''$filters'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$filtered'' | ''?array'' | ''null'' | //none// |+|  ''$filtered'' |  ''?array'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 200: Line 201:
 Set post headline flag (featured / not featured). Set post headline flag (featured / not featured).
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$filters'' | ''(untyped)'' | //required// | //none// | +|  ''$filters'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$filtered'' | ''?array'' | ''null'' | //none// |+|  ''$filtered'' |  ''?array'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 217: Line 218:
 Resolve the post publication datetime in site timezone. Resolve the post publication datetime in site timezone.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$filtered'' | ''array'' | //required// | Distilled post request data |+|  ''$filtered'' |  ''array'' |  //required// |  Distilled post request data |
  
 **Returns:** ''string'' — string Datetime 'Y-m-d H:i:s' **Returns:** ''string'' — string Datetime 'Y-m-d H:i:s'
Line 237: Line 238:
 \- anything else unchanged \- anything else unchanged
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$status'' | ''string'' | //required// | Submitted post status | +|  ''$status'' |  ''string'' |  //required// |  Submitted post status | 
-  | ''$date'' | ''string'' | //required// | Publication datetime 'Y-m-d H:i:s' |+|  ''$date'' |  ''string'' |  //required// |  Publication datetime 'Y-m-d H:i:s' |
  
 **Returns:** ''string'' — string Normalized post status **Returns:** ''string'' — string Normalized post status
Line 245: Line 246:
 ======= Imports ======= ======= Imports =======
  
-  ^ Alias ^ Fully-qualified name ^ +^ Alias ^ Fully-qualified name ^ 
-  | ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] |+| ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] |
  
  
scriptlog/lib/service/postapplicationservice.1790413760.txt.gz · Last modified: by admin