public function initFactoriedServices()
    {
        $config = $this->getConfig();
        if (!isset($config['service_manager'])) {
            return $this;
        }
        
        $smConfig = $config['service_manager'];
        if (!isset($smConfig['factories'])) {
            return $this;
        }
        $factories = $smConfig['factories']->toArray();
        $shared    = isset($smConfig['shared']) ? $smConfig['shared']->toArray() : [];
        foreach ($factories as $serviceName => $serviceConfig) {
            $isShare = isset($shared[$serviceName]) ? (bool) $shared[$serviceName] : true;
            $this->setServiceFactories($serviceName, $serviceConfig, $isShare);
        }

        return $this;
    }