Abstract.php 1.4 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. * Base class for events.
  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. abstract class Phergie_Event_Abstract
  31. {
  32. /**
  33. * Event type, used for determining the callback to execute in response
  34. *
  35. * @var string
  36. */
  37. protected $type;
  38. /**
  39. * Returns the event type.
  40. *
  41. * @return string
  42. */
  43. public function getType()
  44. {
  45. return $this->type;
  46. }
  47. /**
  48. * Sets the event type.
  49. *
  50. * @param string $type Event type
  51. *
  52. * @return Phergie_Event_Abstract Implements a fluent interface
  53. */
  54. public function setType($type)
  55. {
  56. $this->type = (string) $type;
  57. return $this;
  58. }
  59. }