Events.php 831 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Swift Mailer Events Layer
  4. * Please read the LICENSE file
  5. * @copyright Chris Corbyn <chris@w3style.co.uk>
  6. * @author Chris Corbyn <chris@w3style.co.uk>
  7. * @package Swift_Events
  8. * @license GNU Lesser General Public License
  9. */
  10. /**
  11. * Provides core functionality for Swift generated events for plugins
  12. * @package Swift_Events
  13. * @author Chris Corbyn <chris@w3style.co.uk>
  14. */
  15. abstract class Swift_Events
  16. {
  17. /**
  18. * An instance of Swift
  19. * @var Swift
  20. */
  21. protected $swift = null;
  22. /**
  23. * Provide a reference to te currently running Swift this event was generated from
  24. * @param Swift
  25. */
  26. public function setSwift(Swift $swift)
  27. {
  28. $this->swift = $swift;
  29. }
  30. /**
  31. * Get the current instance of swift
  32. * @return Swift
  33. */
  34. public function getSwift()
  35. {
  36. return $this->swift;
  37. }
  38. }