/** * Create a new CommandEvent for $source with $command. * @param Swift_Transport $source * @param string $command * @param array $successCodes */ public function __construct(Swift_Transport $source, $command, $successCodes = array()) { parent::__construct($source); $this->_command = $command; $this->_successCodes = $successCodes; }
/** Bubble $evt up the stack calling $target() on each listener */ private function _bubble(Swift_Events_EventObject $evt, $target) { if (!$evt->bubbleCancelled() && ($listener = array_shift($this->_bubbleQueue))) { $listener->{$target}($evt); $this->_bubble($evt, $target); } }
/** * Create a new ResponseEvent for $source and $response. * * @param Swift_Transport $source * @param string $response * @param bool $valid */ public function __construct(Swift_Transport $source, $response, $valid = false) { parent::__construct($source); $this->_response = $response; $this->_valid = $valid; }
/** * Create a new SendEvent for $source and $message. * * @param Swift_Transport $source * @param Swift_Mime_Message $message */ public function __construct(Swift_Transport $source, Swift_Mime_Message $message) { parent::__construct($source); $this->_message = $message; $this->_result = self::RESULT_PENDING; }
/** * Create a new TransportExceptionEvent for $transport. * @param Swift_Transport $transport * @param Swift_TransportException $ex */ public function __construct(Swift_Transport $transport, Swift_TransportException $ex) { parent::__construct($transport); $this->_exception = $ex; }