public function addItem(Item $item) {
        if(empty($item->title) && empty($item->description)) {
            throw new Exception('At least one of title or description must be defined.');
        }

        $this->items[] = $item;
    }
public function addItem(Item $item) {
        if(empty($item->title) && empty($item->description)) {
            throw new Exception('At least one of title or description must be defined.');
        }

        $this->items[] = $item;
    }
public function addItem ( Item $ item ) { if ( empty ( $ item -> title ) && empty ( $ item -> description ) ) { throw new Exception ( 'At least one of title or description must be defined.' ) ; } $ this -> items [ ] = $ item ; }
Add feed item
@param Item $item
@throws Exception
Add feed item