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

An abstract Event with a source, a target and some text. More...

+ Inheritance diagram for Erebot\Event\WithSourceTargetTextAbstract:

Public Member Functions

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

Protected Attributes

 $text
 Content of this event.
 
- Protected Attributes inherited from Erebot\Event\WithSourceTargetAbstract
 $source
 Source the event originated from.
 
 $target
 Target of the event (usually the bot).
 
- 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 with a source, a target and some text.

Definition at line 27 of file WithSourceTargetTextAbstract.php.

Constructor & Destructor Documentation

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

Creates a new event containing some text and for which a source and a destination (target) can be identified.

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

Definition at line 50 of file WithSourceTargetTextAbstract.php.

References Erebot\Event\WithSourceTargetAbstract\$source, Erebot\Event\WithSourceTargetAbstract\$target, and Erebot\Event\WithSourceTargetTextAbstract\$text.

Member Function Documentation

Erebot\Event\WithSourceTargetTextAbstract::getText ( )

Returns the raw content of the current message. No attempt is made at parsing the content.

Return values
stringThe content of this message.

Implements Erebot\Interfaces\Event\Base\Text.

Definition at line 60 of file WithSourceTargetTextAbstract.php.

References Erebot\Event\WithSourceTargetTextAbstract\$text.


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