$con->return_posts_list($param); } } if ($ctrl == 'forum' && $method == 'POST') { $con = new forumController(); $con->new_forum(); } if ($ctrl == 'posts' && $method == 'GET') { include 'view/post.php'; } if ($ctrl == 'post' && $method == 'GET') { $con = new commentController(); $con->return_comments_list($param); } if ($ctrl == 'post' && $method == 'POST') { $con = new postController(); $con->new_post(); } if ($ctrl == 'comment' && $method == 'POST') { $con = new commentController(); $con->new_comment(); } if ($ctrl == 'search' && $method == 'GET') { $con = new searchController(); $con->search(); } if ($ctrl == 'user' && $method == 'POST') { $con = new userController(); $con->new_user(); } if ($ctrl == 'user' && $method == 'GET') {
public static function viewPost($id) { $posts = new postController(); $post = $posts->getPostWithId($id); Flight::util()->render("post", ["post" => $post]); }