Wraps $item arrays from magpie. More...
Public Member Functions | |
| __construct () | |
| setMagpieItem ($a_item) | |
| Set Magpie Item and read it into internal variables. | |
| secureString ($a_str) | |
| getMagpieItem () | |
| Get Magpie Item. | |
| setTitle ($a_title) | |
| Set Title. | |
| getTitle () | |
| Get Title. | |
| setLink ($a_link) | |
| Set Link. | |
| getLink () | |
| Get Link. | |
| setSummary ($a_summary) | |
| Set Summary. | |
| getSummary () | |
| Get Summary. | |
| setDate ($a_date) | |
| Set Date. | |
| getDate () | |
| Get Date. | |
| setId ($a_id) | |
| Set Id. | |
| getId () | |
| Get Id. | |
| setAuthor ($a_author) | |
| Set Author. | |
| getAuthor () | |
| Get Author. | |
Wraps $item arrays from magpie.
Definition at line 38 of file class.ilExternalFeedItem.php.
| ilExternalFeedItem::__construct | ( | ) |
Definition at line 40 of file class.ilExternalFeedItem.php.
{
}
| ilExternalFeedItem::getAuthor | ( | ) |
Get Author.
Definition at line 249 of file class.ilExternalFeedItem.php.
{
return $this->author;
}
| ilExternalFeedItem::getDate | ( | ) |
Get Date.
Definition at line 209 of file class.ilExternalFeedItem.php.
{
return $this->date;
}
| ilExternalFeedItem::getId | ( | ) |
Get Id.
Definition at line 229 of file class.ilExternalFeedItem.php.
{
return $this->id;
}
| ilExternalFeedItem::getLink | ( | ) |
Get Link.
Definition at line 169 of file class.ilExternalFeedItem.php.
{
return $this->link;
}
| ilExternalFeedItem::getMagpieItem | ( | ) |
Get Magpie Item.
Definition at line 129 of file class.ilExternalFeedItem.php.
{
return $this->magpie_item;
}
| ilExternalFeedItem::getSummary | ( | ) |
Get Summary.
Definition at line 189 of file class.ilExternalFeedItem.php.
Referenced by setMagpieItem().
{
return $this->summary;
}
Here is the caller graph for this function:| ilExternalFeedItem::getTitle | ( | ) |
Get Title.
Definition at line 149 of file class.ilExternalFeedItem.php.
Referenced by setMagpieItem().
{
return $this->title;
}
Here is the caller graph for this function:| ilExternalFeedItem::secureString | ( | $ | a_str | ) |
Definition at line 110 of file class.ilExternalFeedItem.php.
Referenced by setMagpieItem().
{
$a_str = ilUtil::secureString($a_str, true, "<b><i><em><strong><br><ol><li><ul><a><img>");
// set target to blank for all links
while($old_str != $a_str)
{
$old_str = $a_str;
$a_str = eregi_replace("<a href=\"([^\"]*)\">",
"<a href=\"\\1\" target=\"_blank\">", $a_str);
}
return $a_str;
}
Here is the caller graph for this function:| ilExternalFeedItem::setAuthor | ( | $ | a_author | ) |
Set Author.
| string | $a_author Author |
Definition at line 239 of file class.ilExternalFeedItem.php.
Referenced by setMagpieItem().
{
$this->author = $a_author;
}
Here is the caller graph for this function:| ilExternalFeedItem::setDate | ( | $ | a_date | ) |
Set Date.
| string | $a_date Date |
Definition at line 199 of file class.ilExternalFeedItem.php.
Referenced by setMagpieItem().
{
$this->date = $a_date;
}
Here is the caller graph for this function:| ilExternalFeedItem::setId | ( | $ | a_id | ) |
Set Id.
| string | $a_id Id |
Definition at line 219 of file class.ilExternalFeedItem.php.
Referenced by setMagpieItem().
{
$this->id = $a_id;
}
Here is the caller graph for this function:| ilExternalFeedItem::setLink | ( | $ | a_link | ) |
Set Link.
| string | $a_link Link |
Definition at line 159 of file class.ilExternalFeedItem.php.
Referenced by setMagpieItem().
{
$this->link = $a_link;
}
Here is the caller graph for this function:| ilExternalFeedItem::setMagpieItem | ( | $ | a_item | ) |
Set Magpie Item and read it into internal variables.
Definition at line 47 of file class.ilExternalFeedItem.php.
References getSummary(), getTitle(), ilUtil::secureLink(), secureString(), setAuthor(), setDate(), setId(), setLink(), setSummary(), and setTitle().
{
$this->magpie_item = $a_item;
//var_dump($a_item);
// title
$this->setTitle(
$this->secureString($a_item["title"]));
// link
if ($a_item["link_"] != "")
{
$this->setLink(
ilUtil::secureLink($this->secureString($a_item["link_"])));
}
else
{
$this->setLink(
ilUtil::secureLink($this->secureString($a_item["link"])));
}
// summary
if ($a_item["atom_content"] != "")
{
$this->setSummary(
$this->secureString($a_item["atom_content"]));
}
else if ($a_item["summary"] != "")
{
$this->setSummary(
$this->secureString($a_item["summary"]));
}
else
{
$this->setSummary(
$this->secureString($a_item["description"]));
}
// date
if ($a_item["pubdate"] != "")
{
$this->setDate(
$this->secureString($a_item["pubdate"]));
}
else
{
$this->setDate(
$this->secureString($a_item["updated"]));
}
// Author
if ($a_item["dc"]["creator"] != "")
{
$this->setAuthor(
$this->secureString($a_item["dc"]["creator"]));
}
// id
$this->setId(md5($this->getTitle().$this->getSummary()));
}
Here is the call graph for this function:| ilExternalFeedItem::setSummary | ( | $ | a_summary | ) |
Set Summary.
| string | $a_summary Summary |
Definition at line 179 of file class.ilExternalFeedItem.php.
Referenced by setMagpieItem().
{
$this->summary = $a_summary;
}
Here is the caller graph for this function:| ilExternalFeedItem::setTitle | ( | $ | a_title | ) |
Set Title.
| string | $a_title Title |
Definition at line 139 of file class.ilExternalFeedItem.php.
Referenced by setMagpieItem().
{
$this->title = $a_title;
}
Here is the caller graph for this function:
1.7.1