Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:controller:postcontroller

Differences

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

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:controller:postcontroller [2026/09/26 09:09] – admin adminscriptlog:lib:controller:postcontroller [2026/09/26 09:34] (current) – admin admin
Line 10: Line 10:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Class PostController extends BaseApp | +| ''@category'' | Class PostController extends BaseApp | 
-  | ''@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:baseapp|''BaseApp'']] | parent class/interface |+| extends | [[scriptlog:lib:core:baseapp|''BaseApp'']] | parent class/interface |
  
 ======= Constants (0) ======= ======= Constants (0) =======
Line 26: Line 26:
 //None.// //None.//
  
-======= Properties (0) =======+======= Properties (3) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''private'' | ''(untyped)'' | ''$view'' |  | 34 | 
 +| ''private'' | ''(untyped)'' | ''$postService'' |  | 36 | 
 +| ''private'' | ''(untyped)'' | ''$appService'' |  | 38 |
  
 ======= Methods (13) ======= ======= Methods (13) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | (undocumented) | 40 | +| public | ''__construct()'' | (undocumented) | 40 | 
-  | public | ''listItems()'' | abstract method list items | 51 | +| public | ''listItems()'' | abstract method list items | 51 | 
-  | public | ''insert()'' | Create a new post. | 101 | +| public | ''insert()'' | Create a new post. | 101 | 
-  | public | ''update()'' | Update an existing post. | 149 | +| public | ''update()'' | Update an existing post. | 149 | 
-  | public | ''remove()'' | Abstract method remove | 224 | +| public | ''remove()'' | Abstract method remove | 224 | 
-  | private | ''checkPostCsrf()'' | (undocumented) | 255 | +| private | ''checkPostCsrf()'' | (undocumented) | 255 | 
-  | private | ''checkPostPayload()'' | (undocumented) | 264 | +| private | ''checkPostPayload()'' | (undocumented) | 264 | 
-  | private | ''checkPostUpdatePayload()'' | (undocumented) | 274 | +| private | ''checkPostUpdatePayload()'' | (undocumented) | 274 | 
-  | private | ''validatePostSubmission()'' | (undocumented) | 286 | +| private | ''validatePostSubmission()'' | (undocumented) | 286 | 
-  | private | ''validatePostUpdate()'' | (undocumented) | 315 | +| private | ''validatePostUpdate()'' | (undocumented) | 315 | 
-  | private | ''renderNewPostForm()'' | (undocumented) | 338 | +| private | ''renderNewPostForm()'' | (undocumented) | 338 | 
-  | private | ''renderEditPostForm()'' | (undocumented) | 371 | +| private | ''renderEditPostForm()'' | (undocumented) | 371 | 
-  | protected | ''setView()'' | Set view. | 414 |+| protected | ''setView()'' | Set view. | 414 |
  
  
Line 56: Line 59:
 //lines 40–44 (5)// //lines 40–44 (5)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$postService'' | [[scriptlog:lib:service:postservice|''PostService'']] | //required// | //none// | +|  ''$postService'' |  [[scriptlog:lib:service:postservice|''PostService'']] |  //required// |  //none// | 
-  | ''$appService'' | [[scriptlog:lib:service:postapplicationservice|''PostApplicationService'']] | //required// | //none// |+|  ''$appService'' |  [[scriptlog:lib:service:postapplicationservice|''PostApplicationService'']] |  //required// |  //none// |
  
  
Line 103: Line 106:
 Update an existing post. Update an existing post.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// | //none// |+|  ''$id'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — string **Returns:** ''(none declared)'' — string
Line 121: Line 124:
 Abstract method remove Abstract method remove
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// | //none// |+|  ''$id'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 174: Line 177:
 //lines 286–313 (28)// //lines 286–313 (28)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$file_location'' | ''(untyped)'' | //required// | //none// | +|  ''$file_location'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_error'' | ''(untyped)'' | //required// | //none// | +|  ''$file_error'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_size'' | ''(untyped)'' | //required// | //none// | +|  ''$file_size'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_name'' | ''(untyped)'' | //required// | //none// | +|  ''$file_name'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$errors (by reference)'' | ''(untyped)'' | //required// | //none// | +|  ''$errors (by reference)'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$checkError'' | ''(untyped)'' | //required// | //none// |+|  ''$checkError'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 193: Line 196:
 //lines 315–334 (20)// //lines 315–334 (20)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$file_location'' | ''(untyped)'' | //required// | //none// | +|  ''$file_location'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_error'' | ''(untyped)'' | //required// | //none// | +|  ''$file_error'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_size'' | ''(untyped)'' | //required// | //none// | +|  ''$file_size'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$file_name'' | ''(untyped)'' | //required// | //none// | +|  ''$file_name'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$errors (by reference)'' | ''(untyped)'' | //required// | //none// | +|  ''$errors (by reference)'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$checkError'' | ''(untyped)'' | //required// | //none// |+|  ''$checkError'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 212: Line 215:
 //lines 338–369 (32)// //lines 338–369 (32)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$errors'' | ''(untyped)'' | //required// | //none// | +|  ''$errors'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$formData'' | ''(untyped)'' | //required// | //none// | +|  ''$formData'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$user_level'' | ''(untyped)'' | //required// | //none// |+|  ''$user_level'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 228: Line 231:
 //lines 371–406 (36)// //lines 371–406 (36)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$errors'' | ''(untyped)'' | //required// | //none// | +|  ''$errors'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$data_post'' | ''(untyped)'' | //required// | //none// | +|  ''$data_post'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$getPost'' | ''(untyped)'' | //required// | //none// | +|  ''$getPost'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$user_level'' | ''(untyped)'' | //required// | //none// |+|  ''$user_level'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 247: Line 250:
 Set view. Set view.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$viewName'' | ''(untyped)'' | //required// | //none// |+|  ''$viewName'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 254: Line 257:
 ======= Imports ======= ======= Imports =======
  
-  ^ Alias ^ Fully-qualified name ^ +^ Alias ^ Fully-qualified name ^ 
-  | ''ActionConst'' | [[scriptlog:lib:core:actionconst|''Scriptlog\Core\ActionConst'']] | +| ''ActionConst'' | [[scriptlog:lib:core:actionconst|''Scriptlog\Core\ActionConst'']] | 
-  | ''AppException'' | [[scriptlog:lib:core:appexception|''Scriptlog\Core\AppException'']] | +| ''AppException'' | [[scriptlog:lib:core:appexception|''Scriptlog\Core\AppException'']] | 
-  | ''BaseApp'' | [[scriptlog:lib:core:baseapp|''Scriptlog\Core\BaseApp'']] | +| ''BaseApp'' | [[scriptlog:lib:core:baseapp|''Scriptlog\Core\BaseApp'']] | 
-  | ''LogError'' | [[scriptlog:lib:core:logerror|''Scriptlog\Core\LogError'']] | +| ''LogError'' | [[scriptlog:lib:core:logerror|''Scriptlog\Core\LogError'']] | 
-  | ''View'' | [[scriptlog:lib:core:view|''Scriptlog\Core\View'']] | +| ''View'' | [[scriptlog:lib:core:view|''Scriptlog\Core\View'']] | 
-  | ''PostRequestDto'' | [[scriptlog:lib:dto:postrequestdto|''Scriptlog\Dto\PostRequestDto'']] | +| ''PostRequestDto'' | [[scriptlog:lib:dto:postrequestdto|''Scriptlog\Dto\PostRequestDto'']] | 
-  | ''UploadedFileDto'' | [[scriptlog:lib:dto:uploadedfiledto|''Scriptlog\Dto\UploadedFileDto'']] | +| ''UploadedFileDto'' | [[scriptlog:lib:dto:uploadedfiledto|''Scriptlog\Dto\UploadedFileDto'']] | 
-  | ''PostApplicationService'' | [[scriptlog:lib:service:postapplicationservice|''Scriptlog\Service\PostApplicationService'']] | +| ''PostApplicationService'' | [[scriptlog:lib:service:postapplicationservice|''Scriptlog\Service\PostApplicationService'']] | 
-  | ''PostService'' | [[scriptlog:lib:service:postservice|''Scriptlog\Service\PostService'']] | +| ''PostService'' | [[scriptlog:lib:service:postservice|''Scriptlog\Service\PostService'']] | 
-  | ''FileUploadValidator'' | [[scriptlog:lib:validator:fileuploadvalidator|''Scriptlog\Validator\FileUploadValidator'']] | +| ''FileUploadValidator'' | [[scriptlog:lib:validator:fileuploadvalidator|''Scriptlog\Validator\FileUploadValidator'']] | 
-  | ''PostValidator'' | [[scriptlog:lib:validator:postvalidator|''Scriptlog\Validator\PostValidator'']] | +| ''PostValidator'' | [[scriptlog:lib:validator:postvalidator|''Scriptlog\Validator\PostValidator'']] | 
-  | ''ProtectedPostValidator'' | [[scriptlog:lib:validator:protectedpostvalidator|''Scriptlog\Validator\ProtectedPostValidator'']] |+| ''ProtectedPostValidator'' | [[scriptlog:lib:validator:protectedpostvalidator|''Scriptlog\Validator\ProtectedPostValidator'']] |
  
  
scriptlog/lib/controller/postcontroller.1790413759.txt.gz · Last modified: by admin