/** * Destroy a session * * @author Art <*****@*****.**> * @link http://php.net/manual/en/sessionhandlerinterface.destroy.php * * @param string $sessionID The session ID being destroyed. * * @return bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned * internally to PHP for processing. */ public function destroy($sessionID) { parent::destroy($sessionID); try { $sql = $this->client->prepare('DELETE FROM `' . $this->config->table . '` WHERE `id`=? LIMIT 1'); $exec = $sql->execute([$sessionID]); return $exec; //@codeCoverageIgnoreStart } catch (PDOException $e) { $this->log->error('Failed to remove session ' . $sessionID . ' from database: ' . $e->getMessage()); return false; } //@codeCoverageIgnoreEnd }
/** * Destroy a session * * @author Art <*****@*****.**> * @link http://php.net/manual/en/sessionhandlerinterface.destroy.php * * @param string $sessionID The session ID being destroyed. * * @return bool The return value (usually TRUE on success, FALSE on failure). Note this value is returned * internally to PHP for processing. */ public function destroy($sessionID) { $parent = parent::destroy($sessionID); $this->client->delete($this->config->prefix . $sessionID); return $parent; }