src/ProophEventStoreModule/Factory/AbstractRepositoryFactory.php
public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        if (is_null($this->repositoryMap)) {
            if (! $serviceLocator->has('config')) {
                $this->repositoryMap = false;
                return false;
            }

            $config = $serviceLocator->get('config');

            if (! isset($config['prooph.event_store']) || ! isset($config['prooph.event_store']['repository_map'])) {
                $this->repositoryMap = false;
                return;
            }

            $this->repositoryMap = (array)$config['prooph.event_store']['repository_map'];
        }

        return isset($this->repositoryMap[$requestedName]);
    }
public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        if (is_null($this->repositoryMap)) {
            if (! $serviceLocator->has('config')) {
                $this->repositoryMap = false;
                return false;
            }

            $config = $serviceLocator->get('config');

            if (! isset($config['prooph.event_store']) || ! isset($config['prooph.event_store']['repository_map'])) {
                $this->repositoryMap = false;
                return;
            }

            $this->repositoryMap = (array)$config['prooph.event_store']['repository_map'];
        }

        return isset($this->repositoryMap[$requestedName]);
    }
Determine if we can create a service with name

@param ServiceLocatorInterface $serviceLocator
@param $name
@param $requestedName
@return bool