Пример #1
0
 /**
  *
  * @return \FS\SolrBundle\Doctrine\Mapper\Mapping\CommandFactory
  */
 public static function getFactoryWithAllMappingCommand()
 {
     $commandFactory = new CommandFactory();
     $commandFactory->add(new MapAllFieldsCommand(), 'all');
     $commandFactory->add(new MapIdentifierCommand(), 'identifier');
     return $commandFactory;
 }
Пример #2
0
 /**
  *
  * @return \FS\SolrBundle\Doctrine\Mapper\Mapping\CommandFactory
  */
 public static function getFactoryWithAllMappingCommand()
 {
     $reader = new AnnotationReader(new \Doctrine\Common\Annotations\AnnotationReader());
     $commandFactory = new CommandFactory();
     $commandFactory->add(new MapAllFieldsCommand(new MetaInformationFactory($reader)), 'all');
     $commandFactory->add(new MapIdentifierCommand(), 'identifier');
     return $commandFactory;
 }
Пример #3
0
 /**
  * @param MetaInformation metaInformationsy
  * @return \SolrInputDocument|null
  */
 private function toDocument(MetaInformation $metaInformation)
 {
     $command = $this->commandFactory->get('all');
     $this->entityMapper->setMappingCommand($command);
     $doc = $this->entityMapper->toDocument($metaInformation);
     return $doc;
 }
 /**
  * @return CommandFactory
  */
 private function setupCommandFactory()
 {
     $reader = new AnnotationReader(new \Doctrine\Common\Annotations\AnnotationReader());
     $factory = new CommandFactory();
     $factory->add(new MapAllFieldsCommand(new MetaInformationFactory($reader)), 'all');
     $factory->add(new MapIdentifierCommand(), 'identifier');
     return $factory;
 }