Example #1
0
 /**
  *
  */
 protected function createNextReader()
 {
     if ($this->resource) {
         // end existing resource first
         $this->eventDispatcher->dispatch(FeedEvents::RESOURCE_END, new ResourceEvent($this->resource, $this->resources));
     }
     if ($this->resources->isEmpty()) {
         return;
     }
     // get the next resource
     $this->resource = $this->resources->shift();
     // dispatch start event
     $this->eventDispatcher->dispatch(FeedEvents::RESOURCE_START, new ResourceEvent($this->resource, $this->resources));
     // create a reader for this new resource
     $this->createReader($this->resource);
 }