PageRenderTime 53ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/swift/lib/classes/Swift/Events/EventDispatcher.php

http://zoop.googlecode.com/
PHP | 81 lines | 15 code | 11 blank | 55 comment | 0 complexity | 77e6f5bd3f3ecf8ada99af0de6ce9dcd MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.1
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2004-2009 Chris Corbyn
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. //@require 'Swift/Events/EventListener.php';
  10. //@require 'Swift/Event.php';
  11. /**
  12. * Interface for the EventDispatcher which handles the event dispatching layer.
  13. * @package Swift
  14. * @subpackage Events
  15. * @author Chris Corbyn
  16. */
  17. interface Swift_Events_EventDispatcher
  18. {
  19. /**
  20. * Create a new SendEvent for $source and $message.
  21. * @param Swift_Transport $source
  22. * @param Swift_Mime_Message
  23. * @return Swift_Events_SendEvent
  24. */
  25. public function createSendEvent(Swift_Transport $source,
  26. Swift_Mime_Message $message);
  27. /**
  28. * Create a new CommandEvent for $source and $command.
  29. * @param Swift_Transport $source
  30. * @param string $command That will be executed
  31. * @param array $successCodes That are needed
  32. * @return Swift_Events_CommandEvent
  33. */
  34. public function createCommandEvent(Swift_Transport $source,
  35. $command, $successCodes = array());
  36. /**
  37. * Create a new ResponseEvent for $source and $response.
  38. * @param Swift_Transport $source
  39. * @param string $response
  40. * @param boolean $valid If the response is valid
  41. * @return Swift_Events_ResponseEvent
  42. */
  43. public function createResponseEvent(Swift_Transport $source,
  44. $response, $valid);
  45. /**
  46. * Create a new TransportChangeEvent for $source.
  47. * @param Swift_Transport $source
  48. * @return Swift_Events_TransportChangeEvent
  49. */
  50. public function createTransportChangeEvent(Swift_Transport $source);
  51. /**
  52. * Create a new TransportExceptionEvent for $source.
  53. * @param Swift_Transport $source
  54. * @param Swift_TransportException $ex
  55. * @return Swift_Events_TransportExceptionEvent
  56. */
  57. public function createTransportExceptionEvent(Swift_Transport $source,
  58. Swift_TransportException $ex);
  59. /**
  60. * Bind an event listener to this dispatcher.
  61. * @param Swift_Events_EventListener $listener
  62. */
  63. public function bindEventListener(Swift_Events_EventListener $listener);
  64. /**
  65. * Dispatch the given Event to all suitable listeners.
  66. * @param Swift_Events_EventObject $evt
  67. * @param string $target method
  68. */
  69. public function dispatchEvent(Swift_Events_EventObject $evt, $target);
  70. }