public function signOut() { $s = new Session($this->getCookieValue()); if ($s->getId() && !$s->expired()) { $s->setLoggedOut(); $s->commit(); $this->clearCookie(); self::$instance = null; } }