Public Member Functions | Protected Attributes

ilExternalFeedBlock Class Reference

Custom block for external feeds. More...

Inheritance diagram for ilExternalFeedBlock:
Collaboration diagram for ilExternalFeedBlock:

Public Member Functions

 __construct ($a_id=0)
 Constructor.
 setFeedUrl ($a_feed_url)
 Set FeedUrl.
 getFeedUrl ()
 Get FeedUrl.
 create ()
 Create new item.
 read ()
 Read item from database.
 update ()
 Update item in database.
 delete ()
 Delete item from database.

Protected Attributes

 $feed_url

Detailed Description

Custom block for external feeds.

Author:
alex killing <alex.killing@gmx.de
Version:
$Id$

Definition at line 32 of file class.ilExternalFeedBlock.php.


Constructor & Destructor Documentation

ilExternalFeedBlock::__construct ( a_id = 0  ) 

Constructor.

Parameters:
int $a_id

Reimplemented from ilCustomBlock.

Definition at line 42 of file class.ilExternalFeedBlock.php.

References read(), and ilCustomBlock::setId().

        {
                if ($a_id > 0)
                {
                        $this->setId($a_id);
                        $this->read();
                }

        }

Here is the call graph for this function:


Member Function Documentation

ilExternalFeedBlock::create (  ) 

Create new item.

Reimplemented from ilCustomBlock.

Definition at line 76 of file class.ilExternalFeedBlock.php.

References $ilLog, getFeedUrl(), and ilCustomBlock::getId().

        {
                global $ilDB, $ilLog;
                
                parent::create();
                
                $query = "INSERT INTO il_external_feed_block (".
                        " id".
                        ", feed_url".
                        " ) VALUES (".
                        $ilDB->quote($this->getId())
                        .",".$ilDB->quote($this->getFeedUrl()).")";
                $ilDB->query($query);

        }

Here is the call graph for this function:

ilExternalFeedBlock::delete (  ) 

Delete item from database.

Reimplemented from ilCustomBlock.

Definition at line 133 of file class.ilExternalFeedBlock.php.

References ilCustomBlock::getId().

        {
                global $ilDB;
                
                parent::delete();
                
                $query = "DELETE FROM il_external_feed_block".
                        " WHERE id = ".$ilDB->quote($this->getId());
                
                $ilDB->query($query);

        }

Here is the call graph for this function:

ilExternalFeedBlock::getFeedUrl (  ) 

Get FeedUrl.

Returns:
string URL of the external news feed.

Definition at line 67 of file class.ilExternalFeedBlock.php.

Referenced by create(), and update().

        {
                return $this->feed_url;
        }

Here is the caller graph for this function:

ilExternalFeedBlock::read (  ) 

Read item from database.

Reimplemented from ilCustomBlock.

Definition at line 96 of file class.ilExternalFeedBlock.php.

References ilCustomBlock::getId(), and setFeedUrl().

Referenced by __construct().

        {
                global $ilDB;
                
                parent::read();
                
                $query = "SELECT * FROM il_external_feed_block WHERE id = ".
                        $ilDB->quote($this->getId());
                $set = $ilDB->query($query);
                $rec = $set->fetchRow(DB_FETCHMODE_ASSOC);

                $this->setFeedUrl($rec["feed_url"]);

        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilExternalFeedBlock::setFeedUrl ( a_feed_url  ) 

Set FeedUrl.

Parameters:
string $a_feed_url URL of the external news feed.

Definition at line 57 of file class.ilExternalFeedBlock.php.

Referenced by read().

        {
                $this->feed_url = $a_feed_url;
        }

Here is the caller graph for this function:

ilExternalFeedBlock::update (  ) 

Update item in database.

Reimplemented from ilCustomBlock.

Definition at line 115 of file class.ilExternalFeedBlock.php.

References getFeedUrl(), and ilCustomBlock::getId().

        {
                global $ilDB;
                
                parent::update();
                
                $query = "UPDATE il_external_feed_block SET ".
                        " feed_url = ".$ilDB->quote($this->getFeedUrl()).
                        " WHERE id = ".$ilDB->quote($this->getId());
                
                $ilDB->query($query);

        }

Here is the call graph for this function:


Field Documentation

ilExternalFeedBlock::$feed_url [protected]

Definition at line 35 of file class.ilExternalFeedBlock.php.


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