protected function getManager($name)
    {
        $id = $this->getManagerId($name);

        if ($this->getContainer()->has($id)) {
            return $this->getContainer()->get($id);
        }

        throw new \RuntimeException(
            sprintf(
                'Manager named `%s` not found. Available: `%s`.',
                $name,
                implode('`, `', array_keys($this->getContainer()->getParameter('es.managers')))
            )
        );
    }
protected function getManager($name)
    {
        $id = $this->getManagerId($name);

        if ($this->getContainer()->has($id)) {
            return $this->getContainer()->get($id);
        }

        throw new \RuntimeException(
            sprintf(
                'Manager named `%s` not found. Available: `%s`.',
                $name,
                implode('`, `', array_keys($this->getContainer()->getParameter('es.managers')))
            )
        );
    }
protected function getManager ( $ name ) { $ id = $ this -> getManagerId ( $ name ) ; if ( $ this -> getContainer ( ) -> has ( $ id ) ) { return $ this -> getContainer ( ) -> get ( $ id ) ; } throw new \ RuntimeException ( sprintf ( 'Manager named `%s` not found. Available: `%s`.' , $ name , implode ( '`, `' , array_keys ( $ this -> getContainer ( ) -> getParameter ( 'es.managers' ) ) ) ) ) ; }
Returns elasticsearch manager by name from service container.

@param string $name Manager name defined in configuration.

@return Manager

@throws \RuntimeException If manager was not found.
Returns elasticsearch manager by name from service container .