Example #1
0
 public function __construct()
 {
     parent::__construct();
     if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['comment'])) {
         $this->addcomment();
     }
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     $this->comments = new Comments();
     if (!empty($_GET['id'])) {
         $this->viewpost($_GET['id']);
     } else {
         $this->getposts();
     }
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
 }