메소드 | 설명 | |
---|---|---|
__construct ( ) | Create a new EventDispatcher. | |
bindEventListener ( Swift_Events_EventListener $listener ) | Bind an event listener to this dispatcher. | |
createCommandEvent ( Swift_Transport $source, string $command, array $successCodes = [] ) : Swift_Events_CommandEvent | Create a new CommandEvent for $source and $command. | |
createResponseEvent ( Swift_Transport $source, string $response, boolean $valid ) : Swift_Events_ResponseEvent | Create a new ResponseEvent for $source and $response. | |
createSendEvent ( Swift_Transport $source, Swift_Mime_Message $message ) : Swift_Events_SendEvent | Create a new SendEvent for $source and $message. | |
createTransportChangeEvent ( Swift_Transport $source ) : Swift_Events_TransportChangeEvent | Create a new TransportChangeEvent for $source. | |
createTransportExceptionEvent ( Swift_Transport $source, Swift_TransportException $ex ) : Swift_Events_TransportExceptionEvent | Create a new TransportExceptionEvent for $source. | |
dispatchEvent ( Swift_Events_EventObject $evt, string $target ) | Dispatch the given Event to all suitable listeners. |
메소드 | 설명 | |
---|---|---|
_bubble ( Swift_Events_EventObject $evt, $target ) | Bubble $evt up the stack calling $target() on each listener | |
_prepareBubbleQueue ( Swift_Events_EventObject $evt ) | Queue listeners on a stack ready for $evt to be bubbled up it |
public bindEventListener ( Swift_Events_EventListener $listener ) | ||
$listener | Swift_Events_EventListener |
public createCommandEvent ( Swift_Transport $source, string $command, array $successCodes = [] ) : Swift_Events_CommandEvent | ||
$source | Swift_Transport | |
$command | string | That will be executed |
$successCodes | array | That are needed |
리턴 | Swift_Events_CommandEvent |
public createResponseEvent ( Swift_Transport $source, string $response, boolean $valid ) : Swift_Events_ResponseEvent | ||
$source | Swift_Transport | |
$response | string | |
$valid | boolean | If the response is valid |
리턴 | Swift_Events_ResponseEvent |
public createSendEvent ( Swift_Transport $source, Swift_Mime_Message $message ) : Swift_Events_SendEvent | ||
$source | Swift_Transport | |
$message | Swift_Mime_Message | |
리턴 | Swift_Events_SendEvent |
public createTransportChangeEvent ( Swift_Transport $source ) : Swift_Events_TransportChangeEvent | ||
$source | Swift_Transport | |
리턴 | Swift_Events_TransportChangeEvent |
public createTransportExceptionEvent ( Swift_Transport $source, Swift_TransportException $ex ) : Swift_Events_TransportExceptionEvent | ||
$source | Swift_Transport | |
$ex | Swift_TransportException | |
리턴 | Swift_Events_TransportExceptionEvent |
public dispatchEvent ( Swift_Events_EventObject $evt, string $target ) | ||
$evt | Swift_Events_EventObject | |
$target | string | method |