protected function getConfig($services, $name)
    {
        $defaults = [
            'service' => 'EventManager',
            'configure' => true,
            'identifiers' => [ $name ],
            'event' => '\Zend\EventManager\Event',
            'listeners' => [],
        ];

        $config = $services->get('Config');
        $config = isset($config['event_manager'][$name]) ? $config['event_manager'][$name] : [];

        /*
         * array_merge does not work, because the default values for 'identifiers' and 'listeners'
         * are arrays and array_merge breaks the structure.
         */
        $config = array_replace_recursive($defaults, $config);

        return $config;
    }