| Next revision | Previous revision |
| scriptlog:lib:model:postmodel [2026/09/26 09:09] – admin admin | scriptlog:lib:model:postmodel [2026/09/26 09:34] (current) – admin admin |
|---|
| ======= 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) ======= |
| //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 | |
| |
| |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| ======= 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'']] | |
| |
| |