/** * Creates a new event for which a source * and a destination (target) can be identified. * * \param Erebot::Interfaces::Connection $connection * The connection this event came from. * * \param string $source * Source identified for this event. * * \param string $target * Target identified for this event. */ public function __construct(\Erebot\Interfaces\Connection $connection, $source, $target) { parent::__construct($connection); $this->source = new \Erebot\Identity($source); $this->target = $target; }
/** * Constructs a new event dealing with * server capabilities. * * \param Erebot::Interfaces::Connection $connection * The connection this event relates to. * * \param Erebot::Module::Base $module * The module containing information about * the server's capabilities. */ public function __construct(\Erebot\Interfaces\Connection $connection, \Erebot\Module\Base $module) { parent::__construct($connection); $this->module = $module; }
/** * Creates a new event containing some text. * * \param Erebot::Interface::Connection $connection * The connection this event came from. * * \param string $text * Text contained in this event. */ public function __construct(\Erebot\Interfaces\Connection $connection, $text) { parent::__construct($connection); $this->text = new \Erebot\TextWrapper((string) $text); }
/** * Creates a new event dealing with an IRC * channel and for which a source can be * identified. * * \param Erebot::Interfaces::Connection $connection * The connection this event came from. * * \param string $chan * IRC channel this event applies to. * * \param string $source * Source identified for this event. */ public function __construct(\Erebot\Interfaces\Connection $connection, $chan, $source) { parent::__construct($connection); $this->chan = $chan; $this->source = new \Erebot\Identity($source); }