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

An abstract Event which has a source and contains some text. More...

+ Inheritance diagram for Erebot\Event\WithSourceTextAbstract:

Public Member Functions

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

Protected Attributes

 $source
 Source the event originated from.
 
- Protected Attributes inherited from Erebot\Event\WithTextAbstract
 $text
 Content of this event.
 
- 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 contains some text.

Definition at line 27 of file WithSourceTextAbstract.php.

Constructor & Destructor Documentation

Erebot\Event\WithSourceTextAbstract::__construct ( \Erebot\Interfaces\Connection  $connection,
  $source,
  $text 
)

Creates a new event containing some text and for which a source can be identified.

Parameters
Erebot::Interfaces::Connection$connectionThe connection this event came from.
string$sourceSource identified for this event.
string$textText contained in this event.

Definition at line 46 of file WithSourceTextAbstract.php.

References Erebot\Event\WithSourceTextAbstract\$source, and Erebot\Event\WithTextAbstract\$text.

Member Function Documentation

Erebot\Event\WithSourceTextAbstract::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 55 of file WithSourceTextAbstract.php.

References Erebot\Event\WithSourceTextAbstract\$source.


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