public function register()
    {
        $moduleHandler = $this->diFactory->get('moduleHandler');
        $autoloadConf  = $moduleHandler->getModulesAutoloadConfig();

        if (isset($autoloadConf['namespaces'])) {
            if (!ArrayUtils::isHashTable($autoloadConf['namespaces'])) {
                throw new Exception\RuntimeException('Config autoload for namespace is invalid');
            }
            $this->loader->registerNamespaces($autoloadConf['namespaces']);
        }

        if (isset($autoloadConf['classmap'])) {
            $this->registerClassMap($autoloadConf['classmap']);
        }
        $this->loader->register();
        return $this;
    }