Phergie
[ class tree: Phergie ] [ index: Phergie ] [ all elements ]

Class: Phergie_Plugin_Abstract

Source Location: /Phergie/Plugin/Abstract.php

Class Overview


Base class for plugins to provide event handler stubs and commonly needed functionality.


Author(s):

Variables

Methods



Class Details

[line 32]
Base class for plugins to provide event handler stubs and commonly needed functionality.



Tags:

author:  Phergie Development Team <team@phergie.org>
link:  http://pear.phergie.org/package/Phergie
abstract:  
license:  New BSD License


[ Top ]


Class Variables

$config =

[line 39]

Current configuration handler



Tags:

access:  protected

Type:   Phergie_Config


[ Top ]

$connection =

[line 60]

Current connection instance



Tags:

access:  protected

Type:   Phergie_Connection


[ Top ]

$event =

[line 67]

Current incoming event being handled



Tags:

access:  protected



[ Top ]

$events =

[line 53]

Current event handler instance for outgoing events



Tags:

access:  protected



[ Top ]

$name =

[line 74]

Plugin short name



Tags:

access:  protected

Type:   string


[ Top ]

$plugins =

[line 46]

Plugin handler used to provide access to other plugins



Tags:

access:  protected



[ Top ]



Class Methods


method fail [line 112]

Phergie_Plugin_Abstract fail( string $message)

Indicates that the plugin failed to load due to an unsatisfied runtime requirement, such as a missing dependency.



Tags:

return:  Provides a fluent interface
throws:  Phergie_Plugin_Exception Always
access:  protected


Parameters:

string   $message   Error message to provide more information about the reason for the failure

[ Top ]

method getConfig [line 146]

Phergie_Config|mixed getConfig( [string $name = null], [mixed $default = null])

Returns the current configuration handler or the value of a single setting from it.



Tags:

return:  Configuration handler or value of the setting specified by $name
throws:  Phergie_Plugin_Exception No configuration handler has been set
access:  public


Parameters:

string   $name   Optional name of a setting for which the value should be returned instead of the entire configuration handler
mixed   $default   Optional default value to return if no value is set for the setting indicated by $name

[ Top ]

method getConnection [line 242]

Phergie_Connection getConnection( )

Returns the current event connection.



Tags:

throws:  Phergie_Plugin_Exception No connection has been set
access:  public


[ Top ]

method getEvent [line 271]

Phergie_Event_Request|Phergie_Event_Response getEvent( )

Returns the current incoming event to be handled.



Tags:

access:  public


[ Top ]

method getEventHandler [line 212]

Phergie_Event_Handler getEventHandler( )

Returns the current event handler.



Tags:

throws:  Phergie_Plugin_Exception No event handler has been set
access:  public


[ Top ]

method getName [line 81]

string getName( )

Returns the short name for the plugin based on its class name.



Tags:

access:  public


[ Top ]

method getPluginHandler [line 182]

Phergie_Plugin_Handler getPluginHandler( )

Returns the current plugin handler.



Tags:

throws:  Phergie_Plugin_Exception No plugin handler has been set
access:  public


[ Top ]

method onAction [line 455]

void onAction( )

Handler for when the bot receives a CTCP ACTION request.



Tags:

link:  http://www.invlogic.com/irc/ctcp.html#4.4
access:  public


[ Top ]

method onConnect [line 322]

void onConnect( )

Handler for when the bot initially connects to a server.



Tags:

access:  public


[ Top ]

method onCtcp [line 527]

void onCtcp( )

Handler for when the bot receives a CTCP request of an unknown type.



Tags:

link:  http://www.invlogic.com/irc/ctcp.html
access:  public


[ Top ]

method onCtcpPing [line 517]

void onCtcpPing( )

Handler for when the bot receives a CTCP PING request.



Tags:

link:  http://www.invlogic.com/irc/ctcp.html#4.2
access:  public


[ Top ]

method onCtcpReply [line 571]

void onCtcpReply( )

Handler for when a reply received for a CTCP request of an unknown type.



Tags:

link:  http://www.invlogic.com/irc/ctcp.html
access:  public


[ Top ]

method onInvite [line 591]

void onInvite( )

Handler for when the bot receives an invitation to join a channel.



Tags:



[ Top ]

method onJoin [line 405]

void onJoin( )

Handler for when a user joins a channel.



Tags:



[ Top ]

method onKick [line 475]

void onKick( )

Handler for when a user is kicked from a channel.



Tags:



[ Top ]

method onKill [line 581]

void onKill( )

Handler for when the bot receives a kill request from a server.



Tags:



[ Top ]

method onLoad [line 313]

void onLoad( )

Handler for when the plugin is initially loaded - useful for checking runtime dependencies or performing any setup necessary for the plugin to function properly such as initializing a database.



Tags:

access:  public


[ Top ]

method onMode [line 425]

void onMode( )

Handler for when a user or channel mode is changed.



Tags:



[ Top ]

method onNick [line 375]

void onNick( )

Handler for when the server prompts the client for a nick.



Tags:



[ Top ]

method onNotice [line 465]

void onNotice( )

Handler for when a notice is received.



Tags:



[ Top ]

method onOper [line 385]

void onOper( )

Handler for when a user obtains operator privileges.



Tags:



[ Top ]

method onPart [line 415]

void onPart( )

Handler for when a user leaves a channel.



Tags:



[ Top ]

method onPing [line 487]

void onPing( )

Handler for when the bot receives a ping event from a server, at which point it is expected to respond with a pong request within a short period else the server may terminate its connection.



Tags:



[ Top ]

method onPingReply [line 538]

void onPingReply( )

Handler for when a reply is received for a CTCP PING request sent by the bot.



Tags:

link:  http://www.invlogic.com/irc/ctcp.html#4.2
access:  public


[ Top ]

method onPrivmsg [line 445]

void onPrivmsg( )

Handler for when a message is received from a channel or user.



Tags:



[ Top ]

method onQuit [line 395]

void onQuit( )

Handler for when the client session is about to be terminated.



Tags:



[ Top ]

method onResponse [line 602]

void onResponse( )

Handler for when a server response is received to a command issued by the bot.



Tags:



[ Top ]

method onTick [line 333]

void onTick( )

Handler for each tick, a single iteration of the continuous loop executed by the bot to receive, handle, and send events - useful for repeated execution of tasks on a time interval.



Tags:

access:  public


[ Top ]

method onTime [line 497]

void onTime( )

Handler for when the bot receives a CTCP TIME request.



Tags:

link:  http://www.invlogic.com/irc/ctcp.html#4.6
access:  public


[ Top ]

method onTimeReply [line 549]

void onTimeReply( )

Handler for when a reply is received for a CTCP TIME request sent by the bot.



Tags:

link:  http://www.invlogic.com/irc/ctcp.html#4.6
access:  public


[ Top ]

method onTopic [line 435]

void onTopic( )

Handler for when a channel topic is viewed or changed.



Tags:



[ Top ]

method onVersion [line 507]

void onVersion( )

Handler for when the bot receives a CTCP VERSION request.



Tags:

link:  http://www.invlogic.com/irc/ctcp.html#4.1
access:  public


[ Top ]

method onVersionReply [line 560]

void onVersionReply( )

Handler for when a reply is received for a CTCP VERSION request sent by the bot.



Tags:

link:  http://www.invlogic.com/irc/ctcp.html#4.1
access:  public


[ Top ]

method postDispatch [line 365]

void postDispatch( )

Handler for after any events triggered by plugins in response to a received event are sent to the server.



Tags:

access:  public


[ Top ]

method preDispatch [line 355]

void preDispatch( )

Handler for after plugin processing of an event has concluded but before any events triggered in response by plugins are sent to the server - useful for modifying outgoing events before they are sent.



Tags:

access:  public


[ Top ]

method preEvent [line 344]

bool|null|void preEvent( )

Handler for when any event is received but has not yet been dispatched to the plugin handler method specific to its event type.



Tags:

return:  FALSE to short-circuit further event processing, TRUE or NULL otherwise
access:  public


[ Top ]

method setConfig [line 127]

Phergie_Plugin_Abstract setConfig( Phergie_Config $config)

Sets the current configuration handler.



Tags:

return:  Provides a fluent interface
access:  public


Parameters:

Phergie_Config   $config   Configuration handler

[ Top ]

method setConnection [line 230]

Phergie_Plugin_Abstract setConnection( Phergie_Connection $connection)

Sets the current connection.



Tags:

return:  Provides a fluent interface
access:  public


Parameters:

Phergie_Connection   $connection   Connection

[ Top ]

method setEvent [line 260]

Phergie_Plugin_Abstract setEvent( Phergie_Event_Request|Phergie_Event_Response $event)

Sets the current incoming event to be handled.



Tags:

return:  Provides a fluent interface
access:  public


Parameters:


[ Top ]

method setEventHandler [line 200]

Phergie_Plugin_Abstract setEventHandler( Phergie_Event_Handler $handler)

Sets the current event handler.



Tags:

return:  Provides a fluent interface
access:  public


Parameters:

Phergie_Event_Handler   $handler   Event handler

[ Top ]

method setName [line 96]

Phergie_Plugin_Abstract setName( string $name)

Sets the short name for the plugin.



Tags:

return:  Provides a fluent interface
access:  public


Parameters:

string   $name   Plugin short name

[ Top ]

method setPluginHandler [line 170]

Phergie_Plugin_Abstract setPluginHandler( Phergie_Plugin_Handler $handler)

Sets the current plugin handler.



Tags:

return:  Provides a fluent interface
access:  public


Parameters:

Phergie_Plugin_Handler   $handler   Plugin handler

[ Top ]

method __call [line 292]

mixed __call( string $name, $args)

Provides do* methods with signatures identical to those of Phergie_Driver_Abstract but that queue up events to be dispatched later.



Tags:

access:  public


Parameters:

string   $name   Name of the method called
array   $args   Arguments passed in the call

[ Top ]


Documentation generated on Mon, 27 Sep 2010 23:03:46 -0500 by phpDocumentor 1.4.3