Changeset 1469
- Timestamp:
- 06/16/06 17:32:04 (2 years ago)
- Files:
-
- plugins/sfFeed/lib/sfFeed.class.php (modified) (4 diffs)
- plugins/sfFeed/lib/sfFeedItem.class.php (modified) (1 diff)
- plugins/sfFeed/package.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfFeed/lib/sfFeed.class.php
r1400 r1469 95 95 $item = new sfFeedItem(); 96 96 97 $item->set ItemTitle(isset($item_array['title']) ? $item_array['title'] : '');98 $item->set ItemLink(isset($item_array['link']) ? $item_array['link'] : '');99 $item->set ItemDescription(isset($item_array['description']) ? $item_array['description'] : '');100 $item->set ItemAuthorEmail(isset($item_array['authorEmail']) ? $item_array['authorEmail'] : '');101 $item->set ItemAuthorName(isset($item_array['authorName']) ? $item_array['authorName'] : '');102 $item->set ItemAuthorLink(isset($item_array['authorLink']) ? $item_array['authorLink'] : '');103 $item->set ItemPubdate(isset($item_array['pubdate']) ? $item_array['pubdate'] : '');104 $item->set ItemComments(isset($item_array['comments']) ? $item_array['comments'] : '');105 $item->set ItemUniqueId(isset($item_array['uniqueId']) ? $item_array['uniqueId'] : '');106 $item->set ItemEnclosure(isset($item_array['enclosure']) ? $item_array['enclosure'] : '');107 $item->set ItemCategories(isset($item_array['categories']) ? $item_array['categories'] : '');97 $item->setTitle(isset($item_array['title']) ? $item_array['title'] : ''); 98 $item->setLink(isset($item_array['link']) ? $item_array['link'] : ''); 99 $item->setDescription(isset($item_array['description']) ? $item_array['description'] : ''); 100 $item->setAuthorEmail(isset($item_array['authorEmail']) ? $item_array['authorEmail'] : ''); 101 $item->setAuthorName(isset($item_array['authorName']) ? $item_array['authorName'] : ''); 102 $item->setAuthorLink(isset($item_array['authorLink']) ? $item_array['authorLink'] : ''); 103 $item->setPubdate(isset($item_array['pubdate']) ? $item_array['pubdate'] : ''); 104 $item->setComments(isset($item_array['comments']) ? $item_array['comments'] : ''); 105 $item->setUniqueId(isset($item_array['uniqueId']) ? $item_array['uniqueId'] : ''); 106 $item->setEnclosure(isset($item_array['enclosure']) ? $item_array['enclosure'] : ''); 107 $item->setCategories(isset($item_array['categories']) ? $item_array['categories'] : ''); 108 108 109 109 $this->items[] = $item; … … 312 312 public function getItemFeedUniqueId ($item) 313 313 { 314 foreach (array('getFeedUniqueId', 'get Id') as $methodName)314 foreach (array('getFeedUniqueId', 'getUniqueId', 'getId') as $methodName) 315 315 { 316 316 if (method_exists($item, $methodName)) … … 426 426 public function getItemFeedCategories ($item) 427 427 { 428 foreach (array('getFeedCategories') as $methodName) 429 { 430 if (method_exists($item, $methodName)) 431 { 432 return $item->$methodName(); 433 } 434 } 435 436 // categories as an object 437 foreach (array('getCategories') as $methodName) 428 foreach (array('getFeedCategories', 'getCategories') as $methodName) 438 429 { 439 430 if (method_exists($item, $methodName) && is_object($item->$methodName())) 440 431 { 432 // categories as an object 441 433 $categories = $item->$methodName(); 442 434 if (is_array($categories)) … … 451 443 } 452 444 } 445 else 446 { 447 return $item->$methodName(); 448 } 453 449 } 454 450 plugins/sfFeed/lib/sfFeedItem.class.php
r460 r1469 31 31 $categories = array(); 32 32 33 public function set FeedTitle ($title)33 public function setTitle ($title) 34 34 { 35 35 $this->title = $title; 36 36 } 37 37 38 public function get FeedTitle ()38 public function getTitle () 39 39 { 40 40 return $this->title; 41 41 } 42 42 43 public function set FeedLink ($link)43 public function setLink ($link) 44 44 { 45 45 $this->link = $link; 46 46 } 47 47 48 public function get FeedLink ()48 public function getLink () 49 49 { 50 50 return $this->link; 51 51 } 52 52 53 public function set FeedDescription ($description)53 public function setDescription ($description) 54 54 { 55 55 $this->description = $description; 56 56 } 57 57 58 public function get FeedDescription ()58 public function getDescription () 59 59 { 60 60 return $this->description; 61 61 } 62 62 63 public function set FeedAuthorEmail ($authorEmail)63 public function setAuthorEmail ($authorEmail) 64 64 { 65 65 $this->authorEmail = $authorEmail; 66 66 } 67 67 68 public function get FeedAuthorEmail ()68 public function getAuthorEmail () 69 69 { 70 70 return $this->authorEmail; 71 71 } 72 72 73 public function set FeedAuthorName ($authorName)73 public function setAuthorName ($authorName) 74 74 { 75 75 $this->authorName = $authorName; 76 76 } 77 77 78 public function get FeedAuthorName ()78 public function getAuthorName () 79 79 { 80 80 return $this->authorName; 81 81 } 82 82 83 public function set FeedAuthorLink ($authorLink)83 public function setAuthorLink ($authorLink) 84 84 { 85 85 $this->authorLink = $authorLink; 86 86 } 87 87 88 public function get FeedAuthorLink ()88 public function getAuthorLink () 89 89 { 90 90 return $this->authorLink; 91 91 } 92 92 93 public function set FeedPubdate ($pubdate)93 public function setPubdate ($pubdate) 94 94 { 95 95 $this->pubdate = $pubdate; 96 96 } 97 97 98 public function get FeedPubdate ()98 public function getPubdate () 99 99 { 100 100 return $this->pubdate; 101 101 } 102 102 103 public function set FeedComments ($comments)103 public function setComments ($comments) 104 104 { 105 105 $this->comments = $comments; 106 106 } 107 107 108 public function get FeedComments ()108 public function getComments () 109 109 { 110 110 return $this->comments; 111 111 } 112 112 113 public function set FeedUniqueId ($uniqueId)113 public function setUniqueId ($uniqueId) 114 114 { 115 115 $this->uniqueId = $uniqueId; 116 116 } 117 117 118 public function get FeedUniqueId ()118 public function getUniqueId () 119 119 { 120 120 return $this->uniqueId; 121 121 } 122 122 123 public function set FeedEnclosure ($enclosure)123 public function setEnclosure ($enclosure) 124 124 { 125 125 $this->enclosure = $enclosure; 126 126 } 127 127 128 public function get FeedEnclosure ()128 public function getEnclosure () 129 129 { 130 130 return $this->enclosure; 131 131 } 132 132 133 public function set FeedCategories ($categories)133 public function setCategories ($categories) 134 134 { 135 135 $this->categories = $categories; 136 136 } 137 137 138 public function get FeedCategories ()138 public function getCategories () 139 139 { 140 140 return $this->categories; plugins/sfFeed/package.xml
r1409 r1469 11 11 <active>yes</active> 12 12 </lead> 13 <date>2006-06- 09</date>13 <date>2006-06-16</date> 14 14 <version> 15 <release>1.0. 6</release>16 <api>1.0. 0</api>15 <release>1.0.7</release> 16 <api>1.0.1</api> 17 17 </version> 18 18 <stability>