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

@return array|\Zend\ServiceManager\Config
357270
public function getControllerPluginConfig()
    {
        $serviceLocator = $this->serviceLocator;

        return array(
            'factories'     => array(
                'paragraphLayout' => function ( $sm ) use ( $serviceLocator ) {
                    return new Controller\Plugin\ParagraphLayout(
                        $serviceLocator->get(
                            'Grid\Paragraph\Model\Paragraph\MiddleLayoutModel'
                        )
                    );
                },
            ),
        );
    }
825632
protected function loadConfig()
    {
        /** @var DiagnosticServiceInterface $service */
        $service = $this->getServiceLocator()->get(DiagnosticServiceInterface::SERVICE_ID);
        $config = $service->getDiagnosticJsConfig();
        $config['controller'] = 'CompatibilityChecker';
        return $config;
    }
1065032
public static function getConfigurationObjectServices()
    {
        return ServiceFactory::getInstance()
            ->attach(ServiceInterface::SERVICE_CACHE)
            ->with(ServiceInterface::SERVICE_CACHE)
            ->setOption(CacheService::OPTION_CACHE_NAME, InternalCacheService::CONFIGURATION_OBJECT_CACHE_IDENTIFIER)
            ->setOption(CacheService::OPTION_CACHE_BACKEND, InternalCacheService::get()->getBackendCache())
            ->attach(ServiceInterface::SERVICE_PARENTS)
            ->attach(ServiceInterface::SERVICE_DATA_PRE_PROCESSOR)
            ->attach(ServiceInterface::SERVICE_MIXED_TYPES);
    }
464124
public function toString()
    {
        $serviceLocator = $this->getServiceLocator();
        
        $config = $serviceLocator->get('Config');
        
        $configWidgets = isset($config['modules']['Grid\Core']['beforeContentWidget'])
                         ? $config['modules']['Grid\Core']['beforeContentWidget']
                         : array();
        
        foreach ( $configWidgets as $serviceClass )
        {
            $service = $serviceLocator->get( $serviceClass );
            
            if ( $service instanceof ServiceLocatorAwareInterface )
            {
                $service->setServiceLocator( $serviceLocator );
            }
            
            $this->addWidget($service);
        }
        
        $view    = $this->getView();
        $content = '';

        /* @var $widget \Grid\Core\View\BeforeContentWidget\BeforeContentWidgetInterface */
        foreach ( $this->widgets as $widget )
        {
            $content .= $widget->render($view);
        }

        return $content;
    }
1350329
public static function fromConfig()
	{
		$mailer = self::getInstance();

		$services = Config::get ('mailer.services');

		if (!$services) {
			return $mailer;
		}

		foreach ($services as $k => $v) {
			$service = MapperFactory::getServiceMapper()->getFromToken($k);
			if ($service) {
				$service->setFromConfig ($v);
				$mailer->addService ($service);
			}
		}

		return $mailer;
	}
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;
    }
388193
public function getConfig()
    {
        $config = [];
        $provider = new ConfigProvider();

        $config['middleware_pipeline']    = $provider->getMiddlewareConfig();
        $config['service_manager']        = $provider->getDependencyConfig();

        return $config;
    }
600102
public function settingsAction()
    {
        $config = $this->ldap->getConfig();
        $servers = isset($config['servers']) ? $config['servers'] : null;
        $userCreation = isset($config['userCreation']) ? $config['userCreation'] : null;

        return ['servers' => $servers, 'userCreation' => $userCreation];
    }
1342990
public function getViewHelperConfig()
    {
        $serviceLocator = $this->serviceLocator;

        return array(
            'invokables'    => array(
                'userLocale'    => 'Grid\User\View\Helper\UserLocale',
            ),
            'factories'         => array(
                'isAllowed'     => function ( $sm ) use ( $serviceLocator ) {
                    return new View\Helper\IsAllowed(
                        $serviceLocator->get( 'Grid\User\Model\Permissions\Model' )
                    );
                },
            ),
        );
    }
430833
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        $routing = $builder->root('routing');
        {
            $routing->children()->scalarNode('path');
            $routing->children()->scalarNode('cache_dir')->defaultValue(null);
            $routing->children()->variableNode('namespaces')->beforeNormalization()->ifString()->then(
                function ($v) {
                    return [$v];
                }
            );
        }

        return $builder;
    }
1290886
protected function getConfig(): array
    {
        $loader = null;
        if ($this->isCacheEnabled() === true) {
            $loader = $this->getLoader();
            $cached = $loader->load();
            if (empty($cached) === false) {
                return $cached;
            }
        }

        if ($this->isFrameworkEnabled() === true) {
            $this->addFrameworkConfigs();
        }

        $merged = [];
        $merger = $this->getMerger();
        foreach ($this->getConfigs() as $config) {
            $merged = $merger->merge(
                $merged,
                $config->load()
            );
        }

        foreach ($this->getGlobalConfig() as $global) {
            $merged = $merger->merge($merged, $global);
        }

        foreach ($this->getModuleConfig() as $module) {
            $merged = $merger->merge($merged, $module);
        }

        if ($this->isCacheEnabled() === true) {
            if ($loader instanceof CacheLoader) {
                $loader->save($merged);
            }
        }

        return $merged;
    }
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;
    }
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;
    }
1000233
public function getConfiguration(){
        $rest = $this->getService( self::API_FTP_CONFIG);
        $rest->GET();

        return $rest->getResult( models\FtpConfig::class);
    }
313710
public function toArray()
    {
        $array = array();
        $data = $this->data;

        foreach ($data as $key => $value) {
            if ($value instanceof Config) {
                $array[$key] = $value->toArray();
            } else {
                $array[$key] = $value;
            }
        }

        return $array;
    }
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;
    }
1079317
protected function loadServiceConfig()
    {
        $xml = $this->getNode('./servicemanager');
        $config = $this->createServiceManagerConfig($xml, true);

        if ($config) {
            $this->manifest['application_config']['service_manager'] = $config;
        }

        return $this;
    }