Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:model:postmodel

Differences

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

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:model:postmodel [2026/09/26 09:09] – admin adminscriptlog:lib:model:postmodel [2026/09/26 09:34] (current) – admin admin
Line 10: Line 10:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Model class | +| ''@category'' | Model class | 
-  | ''@author'' | M.Noermoehammad | +| ''@author'' | M.Noermoehammad | 
-  | ''@license'' | MIT | +| ''@license'' | MIT | 
-  | ''@version'' | 1.0 |+| ''@version'' | 1.0 |
  
 ======= Inheritance ======= ======= Inheritance =======
  
-  ^ Relation ^ Type ^ Meaning ^ +^ Relation ^ Type ^ Meaning ^ 
-  | extends | [[scriptlog:lib:core:basemodel|''BaseModel'']] | parent class/interface |+| extends | [[scriptlog:lib:core:basemodel|''BaseModel'']] | parent class/interface |
  
 ======= Constants (0) ======= ======= Constants (0) =======
Line 25: Line 25:
 //None.// //None.//
  
-======= Properties (0) =======+======= Properties (1) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''private'' | ''(untyped)'' | ''$linkPosts'' |  | 29 |
  
 ======= Methods (10) ======= ======= Methods (10) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''getPostFeeds()'' | getPostFeeds | 40 | +| public | ''getPostFeeds()'' | getPostFeeds | 40 | 
-  | public | ''getLatestPosts()'' | getLatesetPosts | 74 | +| public | ''getLatestPosts()'' | getLatesetPosts | 74 | 
-  | public | ''getAllBlogPosts()'' | getAllBlogPosts | 115 | +| public | ''getAllBlogPosts()'' | getAllBlogPosts | 115 | 
-  | public | ''getPostById()'' | getPostById | 166 | +| public | ''getPostById()'' | getPostById | 166 | 
-  | public | ''getPostBySlug()'' | getPostBySlug | 196 | +| public | ''getPostBySlug()'' | getPostBySlug | 196 | 
-  | public | ''getPostByAuthor()'' | getPostByAuthor | 234 | +| public | ''getPostByAuthor()'' | getPostByAuthor | 234 | 
-  | public | ''getRandomHeadlines()'' | getRandomHeadlinesPosts | 272 | +| public | ''getRandomHeadlines()'' | getRandomHeadlinesPosts | 272 | 
-  | public | ''getRelatedPosts()'' | getRelatedPosts | 306 | +| public | ''getRelatedPosts()'' | getRelatedPosts | 306 | 
-  | public | ''getRandomPosts()'' | getRandomPosts | 331 | +| public | ''getRandomPosts()'' | getRandomPosts | 331 | 
-  | public | ''getPostsOnSidebar()'' | getPostsOnSidebar | 369 |+| public | ''getPostsOnSidebar()'' | getPostsOnSidebar | 369 |
  
  
Line 56: Line 57:
 Retrieve posts records for sharing post on post feeds Retrieve posts records for sharing post on post feeds
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$limit'' | ''(untyped)'' | //required// | //none// |+|  ''$limit'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 74: Line 75:
 retrieves latest posts and display it on homepage retrieves latest posts and display it on homepage
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$limit'' | ''(untyped)'' | //required// | //none// |+|  ''$limit'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — mixed **Returns:** ''(none declared)'' — mixed
Line 90: Line 91:
 getAllBlogPosts getAllBlogPosts
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$sanitize'' | ''(untyped)'' | //required// | //none// | +|  ''$sanitize'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$perPage'' | [[scriptlog:lib:core:paginator|''Paginator'']] | //required// | //none// |+|  ''$perPage'' |  [[scriptlog:lib:core:paginator|''Paginator'']] |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 109: Line 110:
 retrieving detail post record by Id retrieving detail post record by Id
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// | //none// |+|  ''$id'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — boolean|array|object|mixed **Returns:** ''(none declared)'' — boolean|array|object|mixed
Line 127: Line 128:
 retrieving post record by slug retrieving post record by slug
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$slug'' | ''(untyped)'' | //required// | //none// | +|  ''$slug'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$fetchMode'' | ''(untyped)'' | ''null'' | //none// |+|  ''$fetchMode'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — mixed **Returns:** ''(none declared)'' — mixed
Line 146: Line 147:
 retrieving post records based on author retrieving post records based on author
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$author'' | ''(untyped)'' | //required// | //none// |+|  ''$author'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — mixed **Returns:** ''(none declared)'' — mixed
Line 181: Line 182:
 retrieving related post records retrieving related post records
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$post_title'' | ''(untyped)'' | //required// | //none// |+|  ''$post_title'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — mixed **Returns:** ''(none declared)'' — mixed
Line 199: Line 200:
 retrieving random posts and display it on homepage retrieving random posts and display it on homepage
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$start'' | ''(untyped)'' | //required// | //none// | +|  ''$start'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$end'' | ''(untyped)'' | //required// | //none// |+|  ''$end'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — mixed **Returns:** ''(none declared)'' — mixed
Line 216: Line 217:
 getPostsOnSidebar getPostsOnSidebar
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$limit'' | ''(untyped)'' | //required// | //none// |+|  ''$limit'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 223: Line 224:
 ======= Imports ======= ======= Imports =======
  
-  ^ Alias ^ Fully-qualified name ^ +^ Alias ^ Fully-qualified name ^ 
-  | ''BaseModel'' | [[scriptlog:lib:core:basemodel|''Scriptlog\Core\BaseModel'']] | +| ''BaseModel'' | [[scriptlog:lib:core:basemodel|''Scriptlog\Core\BaseModel'']] | 
-  | ''Paginator'' | [[scriptlog:lib:core:paginator|''Scriptlog\Core\Paginator'']] | +| ''Paginator'' | [[scriptlog:lib:core:paginator|''Scriptlog\Core\Paginator'']] | 
-  | ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] |+| ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] |
  
  
scriptlog/lib/model/postmodel.1790413761.txt.gz · Last modified: by admin