diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-07 12:32:05 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-07 12:32:05 +0100 |
commit | 7f81afd7efbeb931d16ce1f3a1ed53a54226d553 (patch) | |
tree | 180720cd96aa66ae8964f13734e090d4b82a178e /vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php | |
parent | a6d6288e65aa416aca7535e81d9e8837c2cfb103 (diff) |
move 3rdparty directory to vendor to be more consistent with composer standard and because we also use js/vendor for third party libs
Diffstat (limited to 'vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php')
-rw-r--r-- | vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php | 188 |
1 files changed, 188 insertions, 0 deletions
diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php new file mode 100644 index 000000000..77a6f0c97 --- /dev/null +++ b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php @@ -0,0 +1,188 @@ +<?php + +namespace PicoFeed\Parser; + +/** + * Feed + * + * @author Frederic Guillot + * @package Parser + */ +class Feed +{ + /** + * Feed items + * + * @access public + * @var array + */ + public $items = array(); + + /** + * Feed id + * + * @access public + * @var string + */ + public $id = ''; + + /** + * Feed title + * + * @access public + * @var string + */ + public $title = ''; + + /** + * Feed description + * + * @access public + * @var string + */ + public $description = ''; + + /** + * Feed url + * + * @access public + * @var string + */ + public $url = ''; + + /** + * Feed date + * + * @access public + * @var integer + */ + public $date = 0; + + /** + * Feed language + * + * @access public + * @var string + */ + public $language = ''; + + /** + * Feed logo URL (not the same as icon) + * + * @access public + * @var string + */ + public $logo = ''; + + /** + * Return feed information + * + * @access public + * $return string + */ + public function __toString() + { + $output = ''; + + foreach (array('id', 'title', 'url', 'date', 'language', 'description', 'logo') as $property) { + $output .= 'Feed::'.$property.' = '.$this->$property.PHP_EOL; + } + + $output .= 'Feed::items = '.count($this->items).' items'.PHP_EOL; + + foreach ($this->items as $item) { + $output .= '----'.PHP_EOL; + $output .= $item; + } + + return $output; + } + + /** + * Get title + * + * @access public + * $return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Get description + * + * @access public + * $return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Get the logo url + * + * @access public + * $return string + */ + public function getLogo() + { + return $this->logo; + } + + /** + * Get url + * + * @access public + * $return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Get date + * + * @access public + * $return integer + */ + public function getDate() + { + return $this->date; + } + + /** + * Get language + * + * @access public + * $return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * Get id + * + * @access public + * $return string + */ + public function getId() + { + return $this->id; + } + + /** + * Get feed items + * + * @access public + * $return array + */ + public function getItems() + { + return $this->items; + } +} |