Command.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * Phergie
  4. *
  5. * PHP version 5
  6. *
  7. * LICENSE
  8. *
  9. * This source file is subject to the new BSD license that is bundled
  10. * with this package in the file LICENSE.
  11. * It is also available through the world-wide-web at this URL:
  12. * http://phergie.org/license
  13. *
  14. * @category Phergie
  15. * @package Phergie
  16. * @author Phergie Development Team <team@phergie.org>
  17. * @copyright 2008-2010 Phergie Development Team (http://phergie.org)
  18. * @license http://phergie.org/license New BSD License
  19. * @link http://pear.phergie.org/package/Phergie
  20. */
  21. /**
  22. * Event originating from a plugin for the bot.
  23. *
  24. * @category Phergie
  25. * @package Phergie
  26. * @author Phergie Development Team <team@phergie.org>
  27. * @license http://phergie.org/license New BSD License
  28. * @link http://pear.phergie.org/package/Phergie
  29. */
  30. class Phergie_Event_Command extends Phergie_Event_Request
  31. {
  32. /**
  33. * Reference to the plugin instance that created the event
  34. *
  35. * @var Phergie_Plugin_Abstract
  36. */
  37. protected $plugin;
  38. /**
  39. * Stores a reference to the plugin instance that created the event.
  40. *
  41. * @param Phergie_Plugin_Abstract $plugin Plugin instance
  42. *
  43. * @return Phergie_Event_Command Provides a fluent interface
  44. */
  45. public function setPlugin(Phergie_Plugin_Abstract $plugin)
  46. {
  47. $this->plugin = $plugin;
  48. return $this;
  49. }
  50. /**
  51. * Returns a reference to the plugin instance that created the event.
  52. *
  53. * @return Phergie_Plugin_Abstract
  54. */
  55. public function getPlugin()
  56. {
  57. return $this->plugin;
  58. }
  59. }