PHP Class Phergie_Plugin_Remind, phergie

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

Protected Properties

Свойство Type Description
$db resource PDO resource for a SQLite database containing the reminders.
$keepListInMemory boolean Flag that indicates whether or not to use an in-memory reminder list.
$msgStorage In-memory store for pending reminders.
$onlyTargetedReminders boolean Respond *only* to targeted reminders or not.
$publicReminders Number of reminders to show in public.
$remindOnJoin boolean Send reminders when a user joins the channel or not.

Méthodes publiques

Méthode Description
onCommandAsk ( string $recipient, string $message ) : void Handle reminder requests
onCommandRemind ( string $recipient, string $message ) : void Handle reminder requests
onCommandTell ( string $recipient, string $message ) : void Handle reminder requests
onJoin ( ) : void Handler for when a user joins a channel.
onLoad ( ) : void Check for dependencies.
onPrivmsg ( ) : void Intercepts a message and processes any contained recognized commands.

Méthodes protégées

Méthode Description
createTables ( ) : void Creates the database table(s) (if they don't exist)
deleteMessage ( integer $rowid, string $channel, string $nick ) : void Deletes a delivered message
deliverReminders ( string $channel, string $nick ) : void Determines if the user has pending reminders, and if so, delivers them.
fetchMessages ( string $channel = null, string $recipient = null ) : array Get pending messages (for a specific channel/recipient)
handleDelivery ( ) : void Deliver reminders to a user.
handleRemind ( string $recipient, string $message ) : void Handles the tell/remind command (stores the message)
haveTable ( string $name ) : boolean Determines if a table exists
populateMemory ( ) : void Populates the in-memory cache of pending reminders

Method Details

createTables() protected méthode

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

deleteMessage() protected méthode

Deletes a delivered message
protected deleteMessage ( integer $rowid, string $channel, string $nick ) : void
$rowid integer ID of the message to delete
$channel string message's channel
$nick string message's recipient
Résultat void

deliverReminders() protected méthode

Determines if the user has pending reminders, and if so, delivers them.
protected deliverReminders ( string $channel, string $nick ) : void
$channel string channel to check
$nick string nick to check
Résultat void

fetchMessages() protected méthode

Get pending messages (for a specific channel/recipient)
protected fetchMessages ( string $channel = null, string $recipient = null ) : array
$channel string channel on which to check for pending messages
$recipient string user for which to check pending messages
Résultat array of records

handleDelivery() protected méthode

Deliver reminders to a user.
protected handleDelivery ( ) : void
Résultat void

handleRemind() protected méthode

Handles the tell/remind command (stores the message)
protected handleRemind ( string $recipient, string $message ) : void
$recipient string name of the recipient
$message string message to store
Résultat void

haveTable() protected méthode

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

onCommandAsk() public méthode

Handle reminder requests
See also: handleRemind()
public onCommandAsk ( string $recipient, string $message ) : void
$recipient string recipient of the message
$message string message to tell the recipient
Résultat void

onCommandRemind() public méthode

Handle reminder requests
See also: handleRemind()
public onCommandRemind ( string $recipient, string $message ) : void
$recipient string recipient of the message
$message string message to tell the recipient
Résultat void

onCommandTell() public méthode

Handle reminder requests
See also: handleRemind()
public onCommandTell ( string $recipient, string $message ) : void
$recipient string recipient of the message
$message string message to tell the recipient
Résultat void

onJoin() public méthode

Handler for when a user joins a channel.
public onJoin ( ) : void
Résultat void

onLoad() public méthode

Check for dependencies.
public onLoad ( ) : void
Résultat void

onPrivmsg() public méthode

Intercepts a message and processes any contained recognized commands.
public onPrivmsg ( ) : void
Résultat void

populateMemory() protected méthode

Populates the in-memory cache of pending reminders
protected populateMemory ( ) : void
Résultat void

Property Details

$db protected_oe property

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

$keepListInMemory protected_oe property

Flag that indicates whether or not to use an in-memory reminder list.
protected bool $keepListInMemory
Résultat boolean

$msgStorage protected_oe property

In-memory store for pending reminders.
protected $msgStorage

$onlyTargetedReminders protected_oe property

Respond *only* to targeted reminders or not.
protected bool $onlyTargetedReminders
Résultat boolean

$publicReminders protected_oe property

Number of reminders to show in public.
protected $publicReminders

$remindOnJoin protected_oe property

Send reminders when a user joins the channel or not.
protected bool $remindOnJoin
Résultat boolean