public function addFeedableItems($items)
    {
        if (!is_array($items) && !($items instanceof \Traversable)) {
            throw new \InvalidArgumentException('You should pass an array or a collection of Feedable items');
        }

        foreach ($items as $feedable) {
            if (!$feedable instanceof Feedable) {
                throw new \InvalidArgumentException('Feedable items should implement Feedable interface');
            }

            $this->addItem($feedable->getFeedItem());
        }

        return $this;
    }
public function addFeedableItems($items)
    {
        if (!is_array($items) && !($items instanceof \Traversable)) {
            throw new \InvalidArgumentException('You should pass an array or a collection of Feedable items');
        }

        foreach ($items as $feedable) {
            if (!$feedable instanceof Feedable) {
                throw new \InvalidArgumentException('Feedable items should implement Feedable interface');
            }

            $this->addItem($feedable->getFeedItem());
        }

        return $this;
    }
public function addFeedableItems ( $ items ) { if ( ! is_array ( $ items ) && ! ( $ items instanceof \ Traversable ) ) { throw new \ InvalidArgumentException ( 'You should pass an array or a collection of Feedable items' ) ; } foreach ( $ items as $ feedable ) { if ( ! $ feedable instanceof Feedable ) { throw new \ InvalidArgumentException ( 'Feedable items should implement Feedable interface' ) ; } $ this -> addItem ( $ feedable -> getFeedItem ( ) ) ; } return $ this ; }
Adds feedable items.

@param Feedable[] $items A collection of feedable items

@return Feed

@throws \InvalidArgumentException
Adds feedable items .