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

Class: Phergie_Driver_Abstract

Source Location: /Phergie/Driver/Abstract.php

Class Overview


Base class for drivers which handle issuing client commands to the IRC server and converting responses into usable data objects.


Author(s):

Variables

Methods


Child classes:

Phergie_Driver_Streams
Driver that uses the sockets wrapper of the streams extension for communicating with the server and handles formatting and parsing of events using PHP.

Class Details

[line 32]
Base class for drivers which handle issuing client commands to the IRC server and converting responses into usable data objects.



Tags:

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


[ Top ]


Class Variables

$connection =

[line 39]

Currently active connection



Tags:

access:  protected

Type:   Phergie_Connection


[ Top ]



Class Methods


method doAction [line 249]

void doAction( string $target, string $text)

Sends a CTCP ACTION (/me) command to a nick or channel.



Tags:

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


Overridden in child classes as:

Phergie_Driver_Streams::doAction()
Sends a CTCP ACTION (/me) command to a nick or channel.

Parameters:

string   $target   Channel name or user nick
string   $text   Text of the action to perform

[ Top ]

method doConnect [line 86]

void doConnect( )

Initiates a connection with the server.



Tags:

abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doConnect()
Initiates a connection with the server.

[ Top ]

method doFinger [line 293]

void doFinger( string $nick, [string $finger = null])

Sends a CTCP FINGER request to a user.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/ctcpspec.html
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doFinger()
Sends a CTCP FINGER request to a user.

Parameters:

string   $nick   User nick
string   $finger   Finger string to send for a response

[ Top ]

method doInvite [line 128]

void doInvite( string $nick, string $channel)

Invites a user to an invite-only channel.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_2_7
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doInvite()
Invites a user to an invite-only channel.

Parameters:

string   $nick   Nick of the user to invite
string   $channel   Name of the channel

[ Top ]

method doJoin [line 107]

void doJoin( string $channels, [string $keys = null])

Joins a channel.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_2_1
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doJoin()
Joins a channel.

Parameters:

string   $channels   Comma-delimited list of channels to join
string   $keys   Optional comma-delimited list of channel keys

[ Top ]

method doKick [line 228]

void doKick( string $nick, string $channel, [string $reason = null])

Kicks a user from a channel.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_2_8
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doKick()
Kicks a user from a channel.

Parameters:

string   $nick   Nick of the user
string   $channel   Channel name
string   $reason   Reason for the kick (optional)

[ Top ]

method doList [line 150]

void doList( [string $channels = null])

Obtains a list of channel names and topics.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_2_6
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doList()
Obtains a list of channel names and topics.

Parameters:

string   $channels   Comma-delimited list of one or more channels to which the response should be restricted (optional)

[ Top ]

method doMode [line 174]

void doMode( string $target, [string $mode = null], [string $param = null])

Retrieves or changes a channel or user mode.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_2_3
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doMode()
Retrieves or changes a channel or user mode.

Parameters:

string   $target   Channel name or user nick
string   $mode   New mode to assign (optional)
string   $param   User limit when $mode is 'l', user hostmask when $mode is 'b', or user nick when $mode is 'o'

[ Top ]

method doNames [line 138]

void doNames( string $channels)

Obtains a list of nicks of users in specified channels.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_2_5
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doNames()
Obtains a list of nicks of usrs in currently joined channels.

Parameters:

string   $channels   Comma-delimited list of one or more channels

[ Top ]

method doNick [line 184]

void doNick( string $nick)

Changes the client nick.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_1_2
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doNick()
Changes the client nick.

Parameters:

string   $nick   New nick to assign

[ Top ]

method doNotice [line 216]

void doNotice( string $target, string $text)

Sends a notice to a nick or channel.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_4_2
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doNotice()
Sends a notice to a nick or channel.

Parameters:

string   $target   Channel name or user nick
string   $text   Text of the notice to send

[ Top ]

method doPart [line 117]

void doPart( string $channels)

Leaves a channel.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_2_2
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doPart()
Leaves a channel.

Parameters:

string   $channels   Comma-delimited list of channels to leave

[ Top ]

method doPing [line 260]

void doPing( string $nick, string $hash)

Sends a CTCP PING request to a user.



Tags:

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


Overridden in child classes as:

Phergie_Driver_Streams::doPing()
Sends a CTCP PING request or response (they are identical) to a user.

Parameters:

string   $nick   User nick
string   $hash   Hash to use in the handshake

[ Top ]

method doPong [line 238]

void doPong( string $daemon)

Responds to a server test of client responsiveness.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_6_3
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doPong()
Responds to a server test of client responsiveness.

Parameters:

string   $daemon   Daemon from which the original request originates

[ Top ]

method doPrivmsg [line 205]

void doPrivmsg( string $target, string $text)

Sends a message to a nick or channel.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_4_1
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doPrivmsg()
Sends a message to a nick or channel.

Parameters:

string   $target   Channel name or user nick
string   $text   Text of the message to send

[ Top ]

method doQuit [line 96]

void doQuit( [string $reason = null])

Terminates the connection with the server.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_1_6
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doQuit()
Terminates the connection with the server.

Parameters:

string   $reason   Reason for connection termination (optional)

[ Top ]

method doRaw [line 302]

void doRaw( string $command)

Sends a raw command to the server.



Tags:

abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doRaw()
Sends a raw command to the server.

Parameters:

string   $command   Command string to send

[ Top ]

method doTime [line 282]

void doTime( string $nick, [string $time = null])

Sends a CTCP TIME request to a user.



Tags:

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


Overridden in child classes as:

Phergie_Driver_Streams::doTime()
Sends a CTCP TIME request to a user.

Parameters:

string   $nick   User nick
string   $time   Time string to send for a response

[ Top ]

method doTopic [line 161]

void doTopic( string $channel, [string $topic = null])

Retrieves or changes a channel topic.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_2_4
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doTopic()
Retrieves or changes a channel topic.

Parameters:

string   $channel   Name of the channel
string   $topic   New topic to assign (optional)

[ Top ]

method doVersion [line 271]

void doVersion( string $nick, [string $version = null])

Sends a CTCP VERSION request or response to a user.



Tags:

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


Overridden in child classes as:

Phergie_Driver_Streams::doVersion()
Sends a CTCP VERSION request or response to a user.

Parameters:

string   $nick   User nick
string   $version   Version string to send for a response

[ Top ]

method doWhois [line 194]

void doWhois( string $nick)

Retrieves information about a nick.



Tags:

link:  http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_5_2
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::doWhois()
Retrieves information about a nick.

Parameters:

string   $nick   Nick

[ Top ]

method getConnection [line 61]

Phergie_Connection getConnection( )

Returns the currently active connection.



Tags:

throws:  Phergie_Driver_Exception
access:  public


[ Top ]

method getEvent [line 79]

Phergie_Event_Interface|null getEvent( )

Returns an event if one has been received from the server.



Tags:

return:  Event instance if an event has been received, NULL otherwise
abstract:  
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::getEvent()
Listens for an event on the current connection.

[ Top ]

method setConnection [line 48]

Phergie_Driver_Abstract setConnection( Phergie_Connection $connection)

Sets the currently active connection.



Tags:

return:  Provides a fluent interface
access:  public


Overridden in child classes as:

Phergie_Driver_Streams::setConnection()
Overrides the parent class to set the currently active socket handler when the active connection is changed.

Parameters:

Phergie_Connection   $connection   Active connection

[ Top ]


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