FeedWriter\Item::getVersion PHP Method

getVersion() public method

Return the type of this feed item
public getVersion ( ) : string
return string The feed type, as defined in Feed.php
    public function getVersion()
    {
        return $this->version;
    }

Usage Example

コード例 #1
0
ファイル: Feed.php プロジェクト: ericshea00/feedwriter
 /**
  * Add a FeedItem to the main class
  *
  * @access   public
  * @param    Item    instance of Item class
  * @return   self
  */
 public function addItem(Item $feedItem)
 {
     if ($feedItem->getVersion() != $this->version) {
         die('Feed type mismatch: This instance can handle ' . $this->version . ' feeds only, but item with type ' . $feedItem->getVersion() . ' given.');
     }
     $this->items[] = $feedItem;
     return $this;
 }
All Usage Examples Of FeedWriter\Item::getVersion