public function addItem(Item $feedItem)
    {
        if ($feedItem->getVersion() != $this->version)
        {
            $msg = sprintf('Feed type mismatch: This instance can handle %s feeds only, but item for %s feeds given.', $this->version, $feedItem->getVersion());
            throw new \InvalidArgumentException($msg);
        }

        $this->items[] = $feedItem;

        return $this;
    }
public function addItem(Item $feedItem)
    {
        if ($feedItem->getVersion() != $this->version)
        {
            $msg = sprintf('Feed type mismatch: This instance can handle %s feeds only, but item for %s feeds given.', $this->version, $feedItem->getVersion());
            throw new \InvalidArgumentException($msg);
        }

        $this->items[] = $feedItem;

        return $this;
    }
public function addItem ( Item $ feedItem ) { if ( $ feedItem -> getVersion ( ) != $ this -> version ) { $ msg = sprintf ( 'Feed type mismatch: This instance can handle %s feeds only, but item for %s feeds given.' , $ this -> version , $ feedItem -> getVersion ( ) ) ; throw new \ InvalidArgumentException ( $ msg ) ; } $ this -> items [ ] = $ feedItem ; return $ this ; }
Add a FeedItem to the main class

@access   public
@param    Item   $feedItem instance of Item class
@return   self
@throws   \InvalidArgumentException if the given item version mismatches.
Add a FeedItem to the main class