f3 = $f3; parent::__construct($f3->get('DB'), 'notifications'); $this->count = 'count(code)'; } /** * Retrieve notifications * * @return array|FALSE */ public function check() { if (!$this->initLoad) { $this->initLoad = true; $this->load(); } return $this->dry(); } /** * @param int $code of notification to remove from database */ public function Remove(int $code) { $this->reset(); $this->erase(['code=?', $code]); } /** * Truncate all table */ public function emptyAll() { $this->f3->get('DB')->exec('TRUNCATE TABLE notifications'); } }