PHP Class Phergie_Plugin_FeedTicker, phergie

Inheritance: extends Phergie_Plugin_Abstract
Afficher le fichier Open project: phergie/phergie

Protected Properties

Свойство Type Description
$channelsStatus Array with channels's last activity
$db resource PDO resource for a SQLite database.
$lastDeliveryTime Time of last delivery

Méthodes publiques

Méthode Description
checkQueue ( String $channel ) : void Get unread items from the database and delivery then
createTables ( ) : void Creates the database table(s) (if they don't exist)
feedCheckingCallback ( ) : void Cron callback to check the feed
getFeed ( string $url, string $updated, string $etag = '' ) : FeedParser Check if the feed is valid, updated and returns the content + header
getUnreadItems ( String $channel ) : array Get all unread items from this channel
haveTable ( string $name ) : boolean Determines if a table exists
onJoin ( ) : void Tracks users joining a channel
onLoad ( ) : void Checks for dependencies, set default values and starts Cron callback
onPart ( ) : void Tracks users leaving a channel
onPrivmsg ( ) : void Tracks channel chat
onQuit ( ) : void Tracks users quitting a server
setChannelStatus ( String $channel ) : void Check if the bot is not alone in this channel and set new channel Status

Method Details

checkQueue() public méthode

Get unread items from the database and delivery then
public checkQueue ( String $channel ) : void
$channel String ToDo desc
Résultat void

createTables() public méthode

Creates the database table(s) (if they don't exist)
public createTables ( ) : void
Résultat void

feedCheckingCallback() public méthode

Cron callback to check the feed
public feedCheckingCallback ( ) : void
Résultat void

getFeed() public méthode

Check if the feed is valid, updated and returns the content + header
public getFeed ( string $url, string $updated, string $etag = '' ) : FeedParser
$url string Feed URL
$updated string Last time this feed was checked
$etag string Last etag of this feed
Résultat FeedParser

getUnreadItems() public méthode

Get all unread items from this channel
public getUnreadItems ( String $channel ) : array
$channel String ToDo desc
Résultat array

haveTable() public méthode

Determines if a table exists
public haveTable ( string $name ) : boolean
$name string Table name
Résultat boolean

onJoin() public méthode

Tracks users joining a channel
public onJoin ( ) : void
Résultat void

onLoad() public méthode

Checks for dependencies, set default values and starts Cron callback
public onLoad ( ) : void
Résultat void

onPart() public méthode

Tracks users leaving a channel
public onPart ( ) : void
Résultat void

onPrivmsg() public méthode

Tracks channel chat
public onPrivmsg ( ) : void
Résultat void

onQuit() public méthode

Tracks users quitting a server
public onQuit ( ) : void
Résultat void

setChannelStatus() public méthode

Check if the bot is not alone in this channel and set new channel Status
public setChannelStatus ( String $channel ) : void
$channel String TODO desc
Résultat void

Property Details

$channelsStatus protected_oe property

Array with channels's last activity
protected $channelsStatus

$db protected_oe property

PDO resource for a SQLite database.
protected resource $db
Résultat resource

$lastDeliveryTime protected_oe property

Time of last delivery
protected $lastDeliveryTime