1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100:
<?php
class FeedItem
{
private $title = '';
private $link = '';
private $date = null;
private $desc = '';
private $guid = '';
private $image_url = '';
private $enclosure;
private $auth = null;
public function set_title($value) { $this->title = strip_tags($value); }
public function set_date($value) { $this->date = $value; }
public function set_desc($value) { $this->desc = $value; }
public function set_image_url($value) { $this->image_url = $value; }
public function set_enclosure(FeedItemEnclosure $value) { $this->enclosure = $value; }
public function set_auth($auth) { $this->auth = $auth; }
public function set_link($value)
{
if (!($value instanceof Url))
{
$value = new Url($value);
}
$this->link = $value->absolute();
}
public function set_guid($value)
{
if ($value instanceof Url)
{
$this->guid = $value->absolute();
}
else
{
$this->guid = $value;
}
}
public function get_title() { return TextHelper::htmlspecialchars_decode($this->title); }
public function get_link() { return $this->link; }
public function get_guid() { return $this->guid; }
public function get_date() { return $this->date->format(Date::FORMAT_DAY_MONTH, Timezone::USER_TIMEZONE); }
public function get_date_rfc2822() { return $this->date->format(Date::FORMAT_RFC2822, Timezone::USER_TIMEZONE); }
public function get_date_iso8601() { return $this->date->format(Date::FORMAT_ISO8601, Timezone::USER_TIMEZONE); }
public function get_hours() { return $this->date->get_hours(); }
public function get_minutes() { return $this->date->get_minutes(); }
public function get_date_text() { return $this->date->format(Date::FORMAT_DAY_MONTH_YEAR_LONG, Timezone::USER_TIMEZONE); }
public function get_desc() { return TextHelper::htmlspecialchars_decode($this->desc); }
public function get_image_url() { return $this->image_url; }
public function get_enclosure() { return $this->enclosure; }
public function get_auth() { return $this->auth; }
}
?>