예제 #1
0
 protected function getFeed($url, $node)
 {
     $transport = TransportFactory::createTransportFromUrl($url);
     $reader = new XmlReader(new FileResource($transport));
     $reader->setNodeCallback($node);
     return new Feed($reader);
 }
 /**
  * {@inheritDoc}
  */
 public function build(ReaderBuilderInterface $builder, array $options)
 {
     parent::build($builder, $options);
     $reader = new XmlReader([]);
     $reader->setNodeCallback($options['node_name']);
     // break into parts
     $builder->addResourceTransformer(new MultiPartTransformer($reader, new XmlWriter(), $options['part_size']));
 }