src/TreeHouse/Feeder/Reader/AbstractReader.php
public function read()
    {
        if (!$this->valid()) {
            return null;
        }

        // keep a local copy of the resource; the next() call could change the cached one
        $resource = $this->resource;

        $item = $this->current();
        $this->next();

        // serialize the item
        $event = new ResourceSerializeEvent($resource, $item);
        $this->eventDispatcher->dispatch(FeedEvents::RESOURCE_PRE_SERIALIZE, $event);
        $item = $this->serialize($item);
        $this->eventDispatcher->dispatch(FeedEvents::RESOURCE_POST_SERIALIZE, $event);

        return $item;
    }
public function read()
    {
        if (!$this->valid()) {
            return null;
        }

        // keep a local copy of the resource; the next() call could change the cached one
        $resource = $this->resource;

        $item = $this->current();
        $this->next();

        // serialize the item
        $event = new ResourceSerializeEvent($resource, $item);
        $this->eventDispatcher->dispatch(FeedEvents::RESOURCE_PRE_SERIALIZE, $event);
        $item = $this->serialize($item);
        $this->eventDispatcher->dispatch(FeedEvents::RESOURCE_POST_SERIALIZE, $event);

        return $item;
    }
public function read ( ) { if ( ! $ this -> valid ( ) ) { return null ; } // keep a local copy of the resource; the next() call could change the cached one $ resource = $ this -> resource ; $ item = $ this -> current ( ) ; $ this -> next ( ) ; // serialize the item $ event = new ResourceSerializeEvent ( $ resource , $ item ) ; $ this -> eventDispatcher -> dispatch ( FeedEvents :: RESOURCE_PRE_SERIALIZE , $ event ) ; $ item = $ this -> serialize ( $ item ) ; $ this -> eventDispatcher -> dispatch ( FeedEvents :: RESOURCE_POST_SERIALIZE , $ event ) ; return $ item ; }
Wrapper that implements various calls, so you can use the iterator in a
simple while loop.

@return ParameterBag
Wrapper that implements various calls so you can use the iterator in a simple while loop .