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

Class: Phergie_Connection_Handler

Source Location: /Phergie/Connection/Handler.php

Class Overview


Handles connections initiated by the bot.


Author(s):

Implements interfaces:

  • Countable (internal interface)
  • IteratorAggregate (internal interface)

Variables

Methods



Class Details

[line 31]
Handles connections initiated by the bot.



Tags:

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


[ Top ]


Class Variables

$connections =

[line 38]

Map of connections indexed by hostmask



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


constructor __construct [line 45]

void __construct( )

Constructor to initialize storage for connections.



Tags:

access:  public


[ Top ]

method addConnection [line 57]

Phergie_Connection_Handler addConnection( Phergie_Connection $connection)

Adds a connection to the connection list.



Tags:

return:  Provides a fluent interface
access:  public


Parameters:

Phergie_Connection   $connection   Connection to add

[ Top ]

method count [line 90]

int count( )

Returns the number of connections in the list.



Tags:

return:  Number of connections
access:  public



Implementation of:
Countable::count
[ Top ]

method getConnections [line 114]

array getConnections( [array|string $keys = null])

Returns a list of specified connection objects.



Tags:

return:  List of Phergie_Connection objects corresponding to the specified hostmask(s)
access:  public


Parameters:

array|string   $keys   One or more hostmasks identifying the connections to return (optional)

[ Top ]

method getIterator [line 100]

ArrayIterator getIterator( )

Returns an iterator for the connection list.



Tags:

access:  public



Implementation of:
IteratorAggregate::getIterator
[ Top ]

method removeConnection [line 71]

Phergie_Connection_Handler removeConnection( Phergie_Connection|string $connection)

Removes a connection from the connection list.



Tags:

return:  Provides a fluent interface
access:  public


Parameters:

Phergie_Connection|string   $connection   Instance or hostmask for the connection to remove

[ Top ]


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