/**
* Creates an instance of the Drest Manager using the passed configuration object
* Can also pass in a Event Manager instance
*
* @param EntityManagerRegistry $entityManagerRegistry
* @param Configuration $config
* @param Event\Manager $eventManager
* @param ServiceActionRegistry $serviceActionRegistry
*/
private function __construct(EntityManagerRegistry $entityManagerRegistry, Configuration $config, Event\Manager $eventManager, ServiceActionRegistry $serviceActionRegistry)
{
$this->emr = $entityManagerRegistry;
$this->config = $config;
$this->eventManager = $eventManager;
$this->service = new Service($this, $serviceActionRegistry);
// Router is internal and currently cannot be injected / extended
$this->router = new Router();
$this->metadataManager = Manager\Metadata::create($config);
$this->representationManager = Manager\Representation::create($this->config);
}