Esempio n. 1
0
 /**
  * Constructor
  *
  * @param Configuration $config
  * @param SearchClientInterface $client
  * @param EventManager $eventManager
  */
 public function __construct(Configuration $config, SearchClientInterface $client, EventManager $eventManager)
 {
     $this->configuration = $config;
     $this->client = $client;
     $this->eventManager = $eventManager;
     $this->metadataFactory = $this->configuration->getClassMetadataFactory();
     $this->metadataFactory->setSearchManager($this);
     $this->metadataFactory->setConfiguration($this->configuration);
     $this->metadataFactory->setCacheDriver($this->configuration->getMetadataCacheImpl());
     $this->serializer = $this->configuration->getEntitySerializer();
     $this->entityManager = $this->configuration->getEntityManager();
     $this->unitOfWork = new UnitOfWork($this);
 }