public function clear() { if ($this->rootModule) { $this->rootModule = null; } $this->modules = array(); }