Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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