/**
  * Destroy a session
  * @link http://php.net/manual/en/sessionhandlerinterface.destroy.php
  * @param string $session_id The session ID being destroyed.
  * @return bool <p>
  * The return value (usually TRUE on success, FALSE on failure).
  * Note this value is returned internally to PHP for processing.
  * </p>
  * @since 5.4.0
  */
 public function destroy($session_id)
 {
     $return = $this->database->delete($this->table, function (Delete $delete) use($session_id) {
         return $delete->where([['key', '=', $session_id]])->build()->run();
     });
     return $return ? true : false;
 }
Пример #2
0
 /**
  * Veritabanndan veri silme işlemi yapar
  *
  * @return mixed
  */
 public function delete()
 {
     $app = $this;
     return $this->db->delete($this->table, function (Delete $mode) use($app) {
         if (isset($app->where)) {
             $mode->where($app->where);
         }
         return $mode->run();
     });
 }