|
| | __construct (mysqli $mysqli) |
| |
| | GetPostByID ($id) |
| |
| | GetFollowingPost ($id) |
| |
| | FindLastNPosts ($N) |
| |
| | FindAllPostsOrderByIDDesc () |
| |
| | InsertNewCupPSAPost ($cupTitle, $cupID, $date_start, $date_end, $authorID, $clubAbbrev) |
| |
| | InsertNewPost ($title, $content, $display_flag, $author, $signature_flag) |
| |
| | UpdatePost ($id, $title, $content, $display_flag, $signature_flag) |
| |
PostsManager has API functions to handle Post object/s and delivers it through web application.
◆ __construct()
| PostsManager::__construct |
( |
mysqli |
$mysqli | ) |
|
Initialize PostsManager with live database connection.
- Parameters
-
◆ FindAllPostsOrderByIDDesc()
| PostsManager::FindAllPostsOrderByIDDesc |
( |
| ) |
|
Finds all posts by descending id (earliest first).
- Returns
- array<Post>
◆ FindLastNPosts()
| PostsManager::FindLastNPosts |
( |
|
$N | ) |
|
Finds last N posts based on provided N.
- Parameters
-
- Returns
- array<Post>
◆ GetFollowingPost()
| PostsManager::GetFollowingPost |
( |
|
$id | ) |
|
Get following Post compared to one that we have by id.
- Parameters
-
- Returns
- Post|null
◆ GetPostByID()
| PostsManager::GetPostByID |
( |
|
$id | ) |
|
Get Post object by its id.
- Parameters
-
- Returns
- Post|null
◆ InsertNewCupPSAPost()
| PostsManager::InsertNewCupPSAPost |
( |
|
$cupTitle, |
|
|
|
$cupID, |
|
|
|
$date_start, |
|
|
|
$date_end, |
|
|
|
$authorID, |
|
|
|
$clubAbbrev |
|
) |
| |
Post that new Cup was created as public state announcement via this function.
- Parameters
-
| string | $cupTitle | |
| int | $cupID | |
| string | $date_start | |
| string | $date_end | |
| int | $authorID | |
| string | $clubAbbrev | |
- Returns
- void
◆ InsertNewPost()
| PostsManager::InsertNewPost |
( |
|
$title, |
|
|
|
$content, |
|
|
|
$display_flag, |
|
|
|
$author, |
|
|
|
$signature_flag |
|
) |
| |
Insert new news Post for visitors of web application.
- Parameters
-
| string | $title | |
| string | $content | |
| bool | $display_flag | |
| int | $author | |
| int | $signature_flag | |
- Returns
- bool
◆ UpdatePost()
| PostsManager::UpdatePost |
( |
|
$id, |
|
|
|
$title, |
|
|
|
$content, |
|
|
|
$display_flag, |
|
|
|
$signature_flag |
|
) |
| |
Update already existing Post.
- Parameters
-
| int | $id | |
| string | $title | |
| string | $content | |
| int | $display_flag | |
| int | $signature_flag | |
- Returns
- bool
The documentation for this class was generated from the following file: