public function unregister_module($id) { unset($this->modules[$id]); unset($this->states[$id]); return $this->modules; }