public function activate_module($id) { if (!$this->has_module($id)) { throw InvalidModuleException::for_id($id, 'activate'); } $this->states[$id] = true; return $this->get_module($id)->activate(); }