Erebot  latest
A modular IRC bot for PHP 5.3+
Erebot\Event\WithChanSourceAbstract Class Reference

An abstract Event which has a source and applies to a channel. More...

+ Inheritance diagram for Erebot\Event\WithChanSourceAbstract:

Public Member Functions

 __construct (\Erebot\Interfaces\Connection $connection, $chan, $source)
 
 getChan ()
 
 getSource ()
 
- Public Member Functions inherited from Erebot\Event\AbstractEvent
 __construct (\Erebot\Interfaces\Connection $connection)
 
 getConnection ()
 
 preventDefault ($prevent=null)
 

Protected Attributes

 $chan
 IRC channel this event relates to.
 
 $source
 Source the event originated from.
 
- Protected Attributes inherited from Erebot\Event\AbstractEvent
 $connection
 Connection the event originated from.
 
 $halt
 Whether the default action should be prevented or not. More...
 

Detailed Description

An abstract Event which has a source and applies to a channel.

Definition at line 27 of file WithChanSourceAbstract.php.

Constructor & Destructor Documentation

Erebot\Event\WithChanSourceAbstract::__construct ( \Erebot\Interfaces\Connection  $connection,
  $chan,
  $source 
)

Creates a new event dealing with an IRC channel and for which a source can be identified.

Parameters
Erebot::Interfaces::Connection$connectionThe connection this event came from.
string$chanIRC channel this event applies to.
string$sourceSource identified for this event.

Definition at line 51 of file WithChanSourceAbstract.php.

References Erebot\Event\WithChanSourceAbstract\$chan, and Erebot\Event\WithChanSourceAbstract\$source.

Member Function Documentation

Erebot\Event\WithChanSourceAbstract::getChan ( )

Returns the name of the channel this event relates to.

Return values
stringName of the channel affected by the event.

Implements Erebot\Interfaces\Event\Base\Chan.

Definition at line 61 of file WithChanSourceAbstract.php.

References Erebot\Event\WithChanSourceAbstract\$chan.

Erebot\Event\WithChanSourceAbstract::getSource ( )

Returns the source of the current message. This will usually be some user's nickname or the name of an IRC server.

Return values
Erebot::Interfaces::IdentityThe source of this message.

Implements Erebot\Interfaces\Event\Base\Source.

Definition at line 66 of file WithChanSourceAbstract.php.

References Erebot\Event\WithChanSourceAbstract\$source.


The documentation for this class was generated from the following file: