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

An abstract Event. More...

+ Inheritance diagram for Erebot\Event\AbstractEvent:

Public Member Functions

 __construct (\Erebot\Interfaces\Connection $connection)
 
 getConnection ()
 
 preventDefault ($prevent=null)
 

Protected Attributes

 $connection
 Connection the event originated from.
 
 $halt
 Whether the default action should be prevented or not. More...
 

Detailed Description

An abstract Event.

Definition at line 27 of file AbstractEvent.php.

Constructor & Destructor Documentation

Erebot\Event\AbstractEvent::__construct ( \Erebot\Interfaces\Connection  $connection)

Constructs a new event.

Parameters
Erebot::Interfaces::Connection$connectionConnection the event originated from. This can be used later on by event handlers to interact with the connection.

Definition at line 60 of file AbstractEvent.php.

References Erebot\Event\AbstractEvent\$connection.

Member Function Documentation

Erebot\Event\AbstractEvent::getConnection ( )

Returns the connection this event came from. This is the same object as that passed during construction.

Return values
Erebot::Interfaces::ConnectionThe connection this event came from.

Implements Erebot\Interfaces\Event\Base\Generic.

Definition at line 66 of file AbstractEvent.php.

References Erebot\Event\AbstractEvent\$connection.

Erebot\Event\AbstractEvent::preventDefault (   $prevent = null)

Prevents the default action associated with this type of event from occuring.

Parameters
mixed$prevent(optional) Whether the default action should be prevented (true) or not (false). You may also pass the value null to retrieve the current value without modifying it.
Return values
boolPrevious value (if modified by this call), or current value (if the value null was passed to $prevent).

Implements Erebot\Interfaces\Event\Base\Generic.

Definition at line 71 of file AbstractEvent.php.

References Erebot\Event\AbstractEvent\$halt.

Member Data Documentation

Erebot\Event\AbstractEvent::$halt
protected

Whether the default action should be prevented or not.

Todo:
add support for these events or remove them...

Definition at line 47 of file AbstractEvent.php.

Referenced by Erebot\Event\AbstractEvent\preventDefault().


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