public function initialize(array $modules = null)
    {
        if ($this->initialized) return $this;

        if (is_array($modules)) {
            $this->moduleClasses = $modules;
        } else {
            $this->loadConfiguredModuleClasses();
        }

        $this->populateModuleCollection()
             ->sortModules()
             ->populateAssociatedClassIndex();

        $this->initialized = true;

        return $this;
    }