src/CarteBlanche/Loader/EntityManagerLoader.php
protected function _buildEntityManager($em_fullname)
    {
        $em_cfg = CarteBlanche::getConfig($em_fullname);

        if (isset($em_cfg['class'])) {
            $em_class = $em_cfg['class'];
        } else {
            throw new \RuntimeException(
                sprintf('An entity manager configuration must define a class name ("%s")!', $em_fullname)
            );
        }

        $em_options = array();
        if (isset($em_cfg['options'])) {
            $em_options = $em_cfg['options'];
    /*
        } else {
            throw new \RuntimeException(
                sprintf('An entity manager configuration must define an options array ("%s")!', $em_fullname)
            );
    */
        }

        if (!empty($em_class)) {
            $factory = \Library\Factory::create()
                ->factoryName('EntityManager')
                ->mustImplement(Kernel::ENTITY_MANAGER_INTERFACE)
                ;
            return $factory->build($em_class, $em_options);
        }
        return null;
    }
protected function _buildEntityManager($em_fullname)
    {
        $em_cfg = CarteBlanche::getConfig($em_fullname);

        if (isset($em_cfg['class'])) {
            $em_class = $em_cfg['class'];
        } else {
            throw new \RuntimeException(
                sprintf('An entity manager configuration must define a class name ("%s")!', $em_fullname)
            );
        }

        $em_options = array();
        if (isset($em_cfg['options'])) {
            $em_options = $em_cfg['options'];
    /*
        } else {
            throw new \RuntimeException(
                sprintf('An entity manager configuration must define an options array ("%s")!', $em_fullname)
            );
    */
        }

        if (!empty($em_class)) {
            $factory = \Library\Factory::create()
                ->factoryName('EntityManager')
                ->mustImplement(Kernel::ENTITY_MANAGER_INTERFACE)
                ;
            return $factory->build($em_class, $em_options);
        }
        return null;
    }
Build a specific entity manager

@param   string  $em_fullname    The name of the entity manager to build
@return  object  Returns an object to manage the entity
@throws  \RuntimeException if no classname is defined in the EM config