public function __wakeup() { if (self::$storedConnection !== null) { $this->setConnection(self::$storedConnection); } }