예제 #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;
 }