Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function findAll()
 {
     $mapper = $this->solr->getMapper();
     $mapper->setMappingCommand($this->solr->getCommandFactory()->get('all'));
     $metaInformation = $this->solr->getMetaFactory()->loadInformation($this->entity);
     $document = $mapper->toDocument($metaInformation);
     if (null === $document) {
         return null;
     }
     $document->removeField('id');
     $query = new FindByDocumentNameQuery();
     $query->setDocument($document);
     $query->setEntity($this->entity);
     $query->setSolr($this->solr);
     $query->setHydrationMode($this->hydrationMode);
     return $this->solr->query($query);
 }