ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilExternalFeedItem Class Reference

Wraps $item arrays from magpie. More...

+ Collaboration diagram for ilExternalFeedItem:

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.

Detailed Description

Wraps $item arrays from magpie.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 38 of file class.ilExternalFeedItem.php.

Constructor & Destructor Documentation

ilExternalFeedItem::__construct ( )

Definition at line 40 of file class.ilExternalFeedItem.php.

{
}

Member Function Documentation

ilExternalFeedItem::getAuthor ( )

Get Author.

Returns
string Author

Definition at line 249 of file class.ilExternalFeedItem.php.

{
return $this->author;
}
ilExternalFeedItem::getDate ( )

Get Date.

Returns
string Date

Definition at line 209 of file class.ilExternalFeedItem.php.

{
return $this->date;
}
ilExternalFeedItem::getId ( )

Get Id.

Returns
string Id

Definition at line 229 of file class.ilExternalFeedItem.php.

{
return $this->id;
}
ilExternalFeedItem::getLink ( )

Get Link.

Returns
string Link

Definition at line 169 of file class.ilExternalFeedItem.php.

{
return $this->link;
}
ilExternalFeedItem::getMagpieItem ( )

Get Magpie Item.

Returns
object Magpie Item

Definition at line 129 of file class.ilExternalFeedItem.php.

{
return $this->magpie_item;
}
ilExternalFeedItem::getSummary ( )

Get Summary.

Returns
string 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.

Returns
string Title

Definition at line 149 of file class.ilExternalFeedItem.php.

References $title.

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.

Parameters
string$a_authorAuthor

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.

Parameters
string$a_dateDate

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.

Parameters
string$a_idId

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.

Parameters
string$a_linkLink

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.

Parameters
string$a_summarySummary

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.

Parameters
string$a_titleTitle

Definition at line 139 of file class.ilExternalFeedItem.php.

Referenced by setMagpieItem().

{
$this->title = $a_title;
}

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: