PHP 클래스 Phergie_Plugin_Abstract, phergie

저자: Phergie Development Team ([email protected])
파일 보기 프로젝트 열기: phergie/phergie 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$config Phergie_Config Current configuration handler
$connection Phergie_Connection Current connection instance
$event Phergie_Event_Request | Phergie_Event_Response Current incoming event being handled
$events Phergie_Event_Handler Current event handler instance for outgoing events
$name string Plugin short name
$plugins Phergie_Plugin_Handler Plugin handler used to provide access to other plugins

공개 메소드들

메소드 설명
__call ( string $name, array $args ) : mixed Provides do* methods with signatures identical to those of Phergie_Driver_Abstract but that queue up events to be dispatched later.
findDataFile ( string $filename ) : string | null Locates a given data file used by this plugin and returns the path to it. This is currently used mainly for compatibility with PEAR packaging.
getConfig ( string $name = null, mixed $default = null ) : Phergie_Config | mixed Returns the current configuration handler or the value of a single setting from it.
getConnection ( ) : Phergie_Connection Returns the current event connection.
getEvent ( ) : Phergie_Event_Request | Phergie_Event_Response Returns the current incoming event to be handled.
getEventHandler ( ) : Phergie_Event_Handler Returns the current event handler.
getName ( ) : string Returns the short name for the plugin based on its class name.
getPluginHandler ( ) : Phergie_Plugin_Handler Returns the current plugin handler.
onAction ( ) : void Handler for when the bot receives a CTCP ACTION request.
onConnect ( ) : void Handler for when the bot initially connects to a server.
onCtcp ( ) : void Handler for when the bot receives a CTCP request of an unknown type.
onCtcpPing ( ) : void Handler for when the bot receives a CTCP PING request.
onCtcpReply ( ) : void Handler for when a reply received for a CTCP request of an unknown type.
onInvite ( ) : void Handler for when the bot receives an invitation to join a channel.
onJoin ( ) : void Handler for when a user joins a channel.
onKick ( ) : void Handler for when a user is kicked from a channel.
onKill ( ) : void Handler for when the bot receives a kill request from a server.
onLoad ( ) : void 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.
onMode ( ) : void Handler for when a user or channel mode is changed.
onNick ( ) : void Handler for when the server prompts the client for a nick.
onNotice ( ) : void Handler for when a notice is received.
onOper ( ) : void Handler for when a user obtains operator privileges.
onPart ( ) : void Handler for when a user leaves a channel.
onPing ( ) : void 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.
onPingReply ( ) : void Handler for when a reply is received for a CTCP PING request sent by the bot.
onPrivmsg ( ) : void Handler for when a message is received from a channel or user.
onQuit ( ) : void Handler for when the client session is about to be terminated.
onResponse ( ) : void Handler for when a server response is received to a command issued by the bot.
onTick ( ) : void 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.
onTime ( ) : void Handler for when the bot receives a CTCP TIME request.
onTimeReply ( ) : void Handler for when a reply is received for a CTCP TIME request sent by the bot.
onTopic ( ) : void Handler for when a channel topic is viewed or changed.
onVersion ( ) : void Handler for when the bot receives a CTCP VERSION request.
onVersionReply ( ) : void Handler for when a reply is received for a CTCP VERSION request sent by the bot.
postDispatch ( ) : void Handler for after any events triggered by plugins in response to a received event are sent to the server.
preDispatch ( ) : void 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.
preEvent ( ) : boolean | null | void Handler for when any event is received but has not yet been dispatched to the plugin handler method specific to its event type.
setConfig ( Phergie_Config $config ) : Phergie_Plugin_Abstract Sets the current configuration handler.
setConnection ( Phergie_Connection $connection ) : Phergie_Plugin_Abstract Sets the current connection.
setEvent ( Phergie_Event_Request | Phergie_Event_Response $event ) : Phergie_Plugin_Abstract Sets the current incoming event to be handled.
setEventHandler ( Phergie_Event_Handler $handler ) : Phergie_Plugin_Abstract Sets the current event handler.
setName ( string $name ) : Phergie_Plugin_Abstract Sets the short name for the plugin.
setPluginHandler ( Phergie_Plugin_Handler $handler ) : Phergie_Plugin_Abstract Sets the current plugin handler.

보호된 메소드들

메소드 설명
fail ( string $message ) : Phergie_Plugin_Abstract Indicates that the plugin failed to load due to an unsatisfied runtime requirement, such as a missing dependency.

메소드 상세

__call() 공개 메소드

Provides do* methods with signatures identical to those of Phergie_Driver_Abstract but that queue up events to be dispatched later.
public __call ( string $name, array $args ) : mixed
$name string Name of the method called
$args array Arguments passed in the call
리턴 mixed

fail() 보호된 메소드

Indicates that the plugin failed to load due to an unsatisfied runtime requirement, such as a missing dependency.
protected fail ( string $message ) : Phergie_Plugin_Abstract
$message string Error message to provide more information about the reason for the failure
리턴 Phergie_Plugin_Abstract Provides a fluent interface

findDataFile() 공개 메소드

Locates a given data file used by this plugin and returns the path to it. This is currently used mainly for compatibility with PEAR packaging.
public findDataFile ( string $filename ) : string | null
$filename string Name of the file
리턴 string | null File path or NULL if the file cannot be found

getConfig() 공개 메소드

Returns the current configuration handler or the value of a single setting from it.
public getConfig ( string $name = null, mixed $default = null ) : Phergie_Config | mixed
$name string Optional name of a setting for which the value should be returned instead of the entire configuration handler
$default mixed Optional default value to return if no value is set for the setting indicated by $name
리턴 Phergie_Config | mixed Configuration handler or value of the setting specified by $name

getConnection() 공개 메소드

Returns the current event connection.
public getConnection ( ) : Phergie_Connection
리턴 Phergie_Connection

getEvent() 공개 메소드

Returns the current incoming event to be handled.
public getEvent ( ) : Phergie_Event_Request | Phergie_Event_Response
리턴 Phergie_Event_Request | Phergie_Event_Response

getEventHandler() 공개 메소드

Returns the current event handler.
public getEventHandler ( ) : Phergie_Event_Handler
리턴 Phergie_Event_Handler

getName() 공개 메소드

Returns the short name for the plugin based on its class name.
public getName ( ) : string
리턴 string

getPluginHandler() 공개 메소드

Returns the current plugin handler.
public getPluginHandler ( ) : Phergie_Plugin_Handler
리턴 Phergie_Plugin_Handler

onAction() 공개 메소드

Handler for when the bot receives a CTCP ACTION request.
public onAction ( ) : void
리턴 void

onConnect() 공개 메소드

Handler for when the bot initially connects to a server.
public onConnect ( ) : void
리턴 void

onCtcp() 공개 메소드

Handler for when the bot receives a CTCP request of an unknown type.
public onCtcp ( ) : void
리턴 void

onCtcpPing() 공개 메소드

Handler for when the bot receives a CTCP PING request.
public onCtcpPing ( ) : void
리턴 void

onCtcpReply() 공개 메소드

Handler for when a reply received for a CTCP request of an unknown type.
public onCtcpReply ( ) : void
리턴 void

onInvite() 공개 메소드

Handler for when the bot receives an invitation to join a channel.
public onInvite ( ) : void
리턴 void

onJoin() 공개 메소드

Handler for when a user joins a channel.
public onJoin ( ) : void
리턴 void

onKick() 공개 메소드

Handler for when a user is kicked from a channel.
public onKick ( ) : void
리턴 void

onKill() 공개 메소드

Handler for when the bot receives a kill request from a server.
public onKill ( ) : void
리턴 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.
public onLoad ( ) : void
리턴 void

onMode() 공개 메소드

Handler for when a user or channel mode is changed.
public onMode ( ) : void
리턴 void

onNick() 공개 메소드

Handler for when the server prompts the client for a nick.
public onNick ( ) : void
리턴 void

onNotice() 공개 메소드

Handler for when a notice is received.
public onNotice ( ) : void
리턴 void

onOper() 공개 메소드

Handler for when a user obtains operator privileges.
public onOper ( ) : void
리턴 void

onPart() 공개 메소드

Handler for when a user leaves a channel.
public onPart ( ) : void
리턴 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.
public onPing ( ) : void
리턴 void

onPingReply() 공개 메소드

Handler for when a reply is received for a CTCP PING request sent by the bot.
public onPingReply ( ) : void
리턴 void

onPrivmsg() 공개 메소드

Handler for when a message is received from a channel or user.
public onPrivmsg ( ) : void
리턴 void

onQuit() 공개 메소드

Handler for when the client session is about to be terminated.
public onQuit ( ) : void
리턴 void

onResponse() 공개 메소드

Handler for when a server response is received to a command issued by the bot.
public onResponse ( ) : void
리턴 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.
public onTick ( ) : void
리턴 void

onTime() 공개 메소드

Handler for when the bot receives a CTCP TIME request.
public onTime ( ) : void
리턴 void

onTimeReply() 공개 메소드

Handler for when a reply is received for a CTCP TIME request sent by the bot.
public onTimeReply ( ) : void
리턴 void

onTopic() 공개 메소드

Handler for when a channel topic is viewed or changed.
public onTopic ( ) : void
리턴 void

onVersion() 공개 메소드

Handler for when the bot receives a CTCP VERSION request.
public onVersion ( ) : void
리턴 void

onVersionReply() 공개 메소드

Handler for when a reply is received for a CTCP VERSION request sent by the bot.
public onVersionReply ( ) : void
리턴 void

postDispatch() 공개 메소드

Handler for after any events triggered by plugins in response to a received event are sent to the server.
public postDispatch ( ) : void
리턴 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.
public preDispatch ( ) : void
리턴 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.
public preEvent ( ) : boolean | null | void
리턴 boolean | null | void FALSE to short-circuit further event processing, TRUE or NULL otherwise

setConfig() 공개 메소드

Sets the current configuration handler.
public setConfig ( Phergie_Config $config ) : Phergie_Plugin_Abstract
$config Phergie_Config Configuration handler
리턴 Phergie_Plugin_Abstract Provides a fluent interface

setConnection() 공개 메소드

Sets the current connection.
public setConnection ( Phergie_Connection $connection ) : Phergie_Plugin_Abstract
$connection Phergie_Connection Connection
리턴 Phergie_Plugin_Abstract Provides a fluent interface

setEvent() 공개 메소드

Sets the current incoming event to be handled.
public setEvent ( Phergie_Event_Request | Phergie_Event_Response $event ) : Phergie_Plugin_Abstract
$event Phergie_Event_Request | Phergie_Event_Response Event
리턴 Phergie_Plugin_Abstract Provides a fluent interface

setEventHandler() 공개 메소드

Sets the current event handler.
public setEventHandler ( Phergie_Event_Handler $handler ) : Phergie_Plugin_Abstract
$handler Phergie_Event_Handler Event handler
리턴 Phergie_Plugin_Abstract Provides a fluent interface

setName() 공개 메소드

Sets the short name for the plugin.
public setName ( string $name ) : Phergie_Plugin_Abstract
$name string Plugin short name
리턴 Phergie_Plugin_Abstract Provides a fluent interface

setPluginHandler() 공개 메소드

Sets the current plugin handler.
public setPluginHandler ( Phergie_Plugin_Handler $handler ) : Phergie_Plugin_Abstract
$handler Phergie_Plugin_Handler Plugin handler
리턴 Phergie_Plugin_Abstract Provides a fluent interface

프로퍼티 상세

$config 보호되어 있는 프로퍼티

Current configuration handler
protected Phergie_Config $config
리턴 Phergie_Config

$connection 보호되어 있는 프로퍼티

Current connection instance
protected Phergie_Connection $connection
리턴 Phergie_Connection

$event 보호되어 있는 프로퍼티

Current incoming event being handled
protected Phergie_Event_Request|Phergie_Event_Response $event
리턴 Phergie_Event_Request | Phergie_Event_Response

$events 보호되어 있는 프로퍼티

Current event handler instance for outgoing events
protected Phergie_Event_Handler $events
리턴 Phergie_Event_Handler

$name 보호되어 있는 프로퍼티

Plugin short name
protected string $name
리턴 string

$plugins 보호되어 있는 프로퍼티

Plugin handler used to provide access to other plugins
protected Phergie_Plugin_Handler $plugins
리턴 Phergie_Plugin_Handler