public function shutdown_hub() { if ($this->hub) { $this->hub->shutdown(); $this->hub = null; $this->save(); } }