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

An abstract Event with a source and a target. More...

+ Inheritance diagram for Erebot\Event\WithSourceTargetAbstract:

Public Member Functions

 __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

 $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 and a target.

Definition at line 27 of file WithSourceTargetAbstract.php.

Constructor & Destructor Documentation

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

Creates a new event 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.

Definition at line 49 of file WithSourceTargetAbstract.php.

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

Member Function Documentation

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

References Erebot\Event\WithSourceTargetAbstract\$source.

Erebot\Event\WithSourceTargetAbstract::getTarget ( )

Returns the target of the current message. This will generally be the bot's nickname or some other user's nickname.

Return values
stringThe target of this message.

Implements Erebot\Interfaces\Event\Base\Target.

Definition at line 64 of file WithSourceTargetAbstract.php.

References Erebot\Event\WithSourceTargetAbstract\$target.


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