Expected to return \Zend\ServiceManager\Config object or array to seed
such an object.

@return array|\Zend\ServiceManager\Config
199205
public function getControllerConfig()
    {
        return array(
            'factories' => array(
                __NAMESPACE__ . '\\Controller\\TopicProducer' => function ($sm) {
                    $sl = $sm->getServiceLocator();
                    $controller = new \HumusAmqpDemoModule\Controller\TopicProducerController();
                    $controller->setProducer(
                        $sl->get('HumusAmqpModule\PluginManager\Producer')->get('topic-producer')
                    );
                    return $controller;
                },
                __NAMESPACE__ . '\\Controller\\RpcClient' => function ($sm) {
                    $sl = $sm->getServiceLocator();
                    $controller = new \HumusAmqpDemoModule\Controller\RpcClientController();
                    $controller->setRpcClient(
                        $sl->get('HumusAmqpModule\PluginManager\RpcClient')->get('demo-rpc-client')
                    );
                    return $controller;
                }
            )
        );
    }
1052771
public function getConfigurationService()
    {
        if ($this->configurationService == null) {
            $this->configurationService = $this->newService('AppserverIo\Appserver\Core\Api\ConfigurationService');
        }
        return $this->configurationService;
    }
1179410
public function setService()
    {
        $serviceData = $this->getConfig('service.' . $this->service);
        foreach ($serviceData as $key => $value) {
            Arr::set($this->serviceData, $key, $value);
        }
        Arr::forget($this->configData,'service');
        return $this;
    }
233700
public static function init($config = null)
    {
        self::registerDevelopmentErrorHandler();
        self::registerExceptionHandler();

        if ($config === null) {
            $config = static::loadAppConfig();
        }

        static::addCoreModule($config);

        $serviceConfig = isset($config['service_manager']) ? $config['service_manager'] : array();
        $listeners = isset($config['listeners'])? $config['listeners'] : array();
        $serviceManager = new ServiceManager(new ServiceConfig($serviceConfig));

        $serviceManager->setService('ApplicationConfig', $config);
        $serviceManager->get('ModuleManager')->loadModules();

        return $serviceManager->get('Application')->bootstrap($listeners);
    }
690865
public static function getComponentConfig()
    {
        $config = new self();
        $config->getSmtpConfig();
        return [
            'useFileTransport' => false,
            'transport' => [
                'class' => 'Swift_SmtpTransport',
                'host' => $config->smtp_host,
                'username' => $config->smtp_username,
                'password' => $config->smtp_password,
                'port' => $config->smtp_port,
                'encryption' => $config->smtp_encryption,

            ],
            'messageConfig' => [
                'charset' => 'UTF-8',
                'from' => [$config->smtp_username => $config->smtp_nickname]
            ],
        ];
    }
1291632
protected function getServerInitConfig()
    {
        return [
            'host'      => isset($this->config['host']) ? $this->config['host'] : '0.0.0.0',
            'port'      => isset($this->config['port']) ? $this->config['port'] : 8080,
            'sockType'  => isset($this->config['sockType']) ? (SWOOLE_SOCK_UDP | $this->config['sockType']) : SWOOLE_SOCK_UDP,
            'mode'      => isset($this->config['mode']) ? $this->config['mode'] : SWOOLE_PROCESS,
        ];
    }
888177
public function getLucidSettings()
    {
        $service = $this->getParsedServiceInput();
        $general = [
            'provider' => [
                'path' => '/config/auth.php',
                'search' => "'providers' => [",
                'stub' => __DIR__ . '/../stubs/Lucid/config/providers.stub',
                'prefix' => false,
            ],
            'kernel' => [
                'path' => '/app/Http/Kernel.php',
                'search' => 'protected $routeMiddleware = [',
                'stub' => __DIR__ . '/../stubs/Lucid/Middleware/Kernel.stub',
                'prefix' => false,
            ],
            'map_register' => [
                'path' => '/src/Services/' . studly_case($service) . '/Providers/RouteServiceProvider.php',
                'search' => '$this->loadRoutesFile($router, $namespace, $routesPath);',
                'stub' => __DIR__ . '/../stubs/Lucid/routes/map-register.stub',
                'prefix' => false,
            ],
        ];

        return $general;
    }
530291
private function _set_config()
    {
	$ok = false;
	$this->_configs = array();

	if( $this->_file_lib->check_dir() )
	{
	    $all_configs_file = $this->_file_lib->get_path_files();

	    $wise = Wise::create( $this->_file_lib );
	    foreach( $all_configs_file as $service_name => $config_file )
	    {
		$this->_configs[$service_name] = $wise->loadFlat( $config_file );
	    }
	}

	return $ok;
    }
461552
public function toArray()
    {
        $data = [];

        foreach ($this->config as $key => $value) {
            if ($value instanceof self) {
                $value = $value->toArray();
            }

            $data[$key] = $value;
        }

        return $data;
    }
42279
public function getServices()
    {
        $this->container = parent::getServices();
        $this->container['db'] = function ($c) {
            $db = new Db();
            $db->setCredentials($this->getDbConfig());
            $type = 'mysqli';
            if(class_exists('Pdo')) {
                $type = 'pdo';
            }
            
            $db->setAccessType($type);
            return $db;
        };
        
        $this->container['encrypt'] = function ($c) {
            $encrypt = new Encrypt();
            $new_key = $c['platform']->getEncryptionKey();
            $encrypt->setKey($new_key);
            return $encrypt;
        };
        
        $this->container['lang'] = function ($c) {
            $lang = new Language();
            if (is_array($this->getLangPath())) {
                foreach ($this->getLangPath() as $path) {
                    $lang->init($path);
                }
            } elseif ($this->getLangPath() != '') {
                $lang->init($this->getLangPath());
            }
            return $lang;
        };
        
        $this->container['validate'] = function ($c) {
            $validate = new Validate();
            $validate->setRegex($this->container['regex']);
            return $validate;
        };
        
        $this->container['files'] = function ($c) {
            $file = new Files();
            return $file;
        };
        
        $this->container['errors'] = function ($c) {
            $errors = new Errors();
            $errors->setValidation($c['validate']);
            return $errors;
        };
        
        $this->container['license'] = function ($c) {
            $license = new License();
            return $license;
        };
        
        $this->container['email'] = function ($c) {
            
            $email = new Email();
            $email->setView($c['view']);
            $email->setLang($c['lang']);
            return $email;
        };
        
        $this->container['view'] = function ($c) {
            $view = new View();
            $helpers = array(
                'file_size' => function ($text) {
                    return $this->container['view_helpers']->m62FileSize($text, false);
                },
                'lang' => function ($text) {
                    return $this->container['view_helpers']->m62Lang($text);
                },
                'date_time' => function ($text, $html = true) {
                    return $this->container['view_helpers']->m62DateTime($text, false);
                },
                'relative_time' => function ($date) {
                    return $this->container['view_helpers']->m62RelativeDateTime($date);
                },
                'encode' => function ($text) {
                    return $this->container['view_helpers']->m62Encode($text);
                },
                'decode' => function ($text) {
                    return $this->container['view_helpers']->m62Decode($text);
                }
            );
            
            $view->addHelper('m62', $helpers);
            return $view;
        };
        
        $this->container['regex'] = function ($c) {
            $regex = new Regex();
            return $regex;
        };
        
        $this->container['shell'] = function ($c) {
            $shell = new Shell();
            return $shell;
        };
        
        $this->container['console'] = function ($c) {
            $console = new Console();
            $console->setLang($c['lang']);
            return $console;
        };
        
        return $this->container;
    }
728405
protected function getSessionConfig(
        ServiceLocatorInterface $serviceLocator,
        $sessionConfig
    ) {
        if (empty($sessionConfig)
            || empty($sessionConfig['config'])
        ) {
            return new SessionConfig();
        }

        $class = '\Zend\Session\Config\SessionConfig';
        $options = [];

        if (isset($sessionConfig['config']['class'])
        ) {
            $class = $sessionConfig['config']['class'];
        }

        if (isset($sessionConfig['config']['options'])
        ) {
            $options = $sessionConfig['config']['options'];
        }

        /** @var \Zend\Session\Config\ConfigInterface $sessionConfigObject */
        if ($serviceLocator->has($class)) {
            $sessionConfigObject = $serviceLocator->get($class);
        } else {
            $sessionConfigObject = new $class();
        }

        if (!$sessionConfigObject instanceof ConfigInterface) {
            throw new InvalidArgumentException(
                'Session Config class must implement '
                . '\Zend\Session\Config\ConfigInterface'
            );
        }

        $sessionConfigObject->setOptions($options);

        return $sessionConfigObject;
    }
1374332
public function getResources()
    {
        $services = [];
        foreach (ServiceManager::getServiceNames(true) as $serviceName) {
            if (Session::allowsServiceAccess($serviceName)) {
                $services[] = [static::getResourceIdentifier() => $serviceName];
            }
        }

        return $services;
    }
1325617
public function getServices()
    {
        $services = $this->cacheProvider->fetch(self::CACHE_KEY_SERVICES_URLS);
        if (is_array($services)) {
            return $services;
        }

        $services = [];
        foreach ($this->analyticsServices as $name => $service) {
            if (is_numeric($name)) {
                continue;
            }

            $services[] = [
                '$ref' => $this->router->generate(
                    'graviton_analytics_service',
                    [
                        'service' => $service['route']
                    ],
                    false
                ),
                'profile' => $this->router->generate(
                    'graviton_analytics_service_schema',
                    [
                        'service' => $service['route']
                    ],
                    true
                )
            ];
        }
        $this->cacheProvider->save(
            self::CACHE_KEY_SERVICES_URLS,
            $services,
            $this->cacheTimeMetadata
        );
        return $services;
    }
290223
public function getConfig(): array
    {
        $structure = [
            'locationMappings' => [],
            'defaultMappings' => [],
            'fallbackContentType' => $this->buildFallbackContentTypeStructure($this->fallbackContentType),
            'maxFileSize' => $this->maxFileSize,
        ];

        foreach ($this->locationMappings as $locationIdentifier => $locationConfiguration) {
            $structure['locationMappings'][$locationIdentifier] = [
                'contentTypeIdentifier' => $locationConfiguration['content_type_identifier'],
                'mimeTypeFilter' => $locationConfiguration['mime_type_filter'],
                'mappings' => [],
            ];

            foreach ($locationConfiguration['mappings'] as $mappingGroup) {
                $structure['locationMappings'][$locationIdentifier]['mappings'][] = $this->buildMappingGroupStructure($mappingGroup);
            }
        }

        foreach ($this->defaultMappings as $mappingGroup) {
            $structure['defaultMappings'][] = $this->buildMappingGroupStructure($mappingGroup);
        }

        return $structure;
    }
444712
public function loadServicesConfig()
    {
        $configPath = $this->serviceConfigPath;

        if (!file_exists($configPath)) {
            throw new InvalidArgumentException(
                sprintf(
                    "Service config file '%s' doesn`t exists",
                    $configPath
                )
            );
        }

        $config = json_decode(file_get_contents($configPath), true);

        if (!is_array($config)) {
            throw new RuntimeException('Empty credentials config');
        }

        $this->serviceConfig = $config;

        return $this;
    }
812198
public function getServiceConfig()
    {
        $configFiles = glob(
                $this->getDir() . '/' . $this->relativeModuleDir . 'config/service/service.config{,.*}.php',
                GLOB_BRACE
        );

        // glob() returns false on error. On some systems, glob() will return false (instead of an empty array) if no
        // files are found. Treat both in the same way - no config will be loaded.
        $configFiles = $configFiles ?: array();

        $config = array();
        foreach ($configFiles as $configFile) {
            $config = ArrayUtils::merge($config, include $configFile);
        }
        return $config;
    }
1204986
protected function getFormConfiguration()
    {
        $formConfigurationArray = $this->getFormObject()->getConfiguration()->toArray();
        $this->removeFieldsValidationConfiguration($formConfigurationArray)
            ->addClassNameProperty($formConfigurationArray);

        return ArrayService::get()->arrayToJavaScriptJson($formConfigurationArray);
    }