public function removeModule($module) { $index = array_search($module, $this->modules); if ($index !== false) { unset($this->modules[$index]); } }