src/Controller/Traits/ConfigTrait.php
protected function getConfig($file = null)
    {
        // Config
        $appConfig = $this->getServiceLocator()->get('Config');

        if (!isset($appConfig['sphinxsearch'])) {
            throw new \InvalidArgumentException('Config not found with name: "sphinxsearch"');
        } else {
            $config = new Config($appConfig['sphinxsearch'], true); // defaults
            if (!is_null($file)) {
                $fileConfig = Factory::fromFile($file, true);
                if (!isset($fileConfig['sphinxsearch'])) {
                    throw new \InvalidArgumentException('Config not found with name: "sphinxsearch"');
                }
                $config->merge($fileConfig['sphinxsearch']);
            }
        }

        return $config;
    }
protected function getConfig($file = null)
    {
        // Config
        $appConfig = $this->getServiceLocator()->get('Config');

        if (!isset($appConfig['sphinxsearch'])) {
            throw new \InvalidArgumentException('Config not found with name: "sphinxsearch"');
        } else {
            $config = new Config($appConfig['sphinxsearch'], true); // defaults
            if (!is_null($file)) {
                $fileConfig = Factory::fromFile($file, true);
                if (!isset($fileConfig['sphinxsearch'])) {
                    throw new \InvalidArgumentException('Config not found with name: "sphinxsearch"');
                }
                $config->merge($fileConfig['sphinxsearch']);
            }
        }

        return $config;
    }
protected function getConfig ( $ file = null ) { // Config $ appConfig = $ this -> getServiceLocator ( ) -> get ( 'Config' ) ; if ( ! isset ( $ appConfig [ 'sphinxsearch' ] ) ) { throw new \ InvalidArgumentException ( 'Config not found with name: "sphinxsearch"' ) ; } else { $ config = new Config ( $ appConfig [ 'sphinxsearch' ] , true ) ; // defaults if ( ! is_null ( $ file ) ) { $ fileConfig = Factory :: fromFile ( $ file , true ) ; if ( ! isset ( $ fileConfig [ 'sphinxsearch' ] ) ) { throw new \ InvalidArgumentException ( 'Config not found with name: "sphinxsearch"' ) ; } $ config -> merge ( $ fileConfig [ 'sphinxsearch' ] ) ; } } return $ config ; }
Retrieve the config of sphinxsearch node

@param string|null $file
@return Config
Retrieve the config of sphinxsearch node