Author: Chris Corbyn (chris@w3style.co.uk)
Inheritance: extends Swift_Events
 /**
  * Part of the interface which is notified after a command is sent.
  * @param Swift_Events_CommandEvent
  */
 public function commandSent(Swift_Events_CommandEvent $e)
 {
     $code = $e->getCode();
     $add = 0;
     if ($code != -1) {
         $add = 2;
     }
     $bytes = strlen($e->getString()) + $add;
     $this->addBytesOut($bytes);
 }
 /**
  * Invoked immediately following a command being sent.
  *
  * @param Swift_Events_CommandEvent $evt
  */
 public function commandSent(Swift_Events_CommandEvent $evt)
 {
     $command = $evt->getCommand();
     $this->_logger->add(sprintf('>> %s', $command));
 }
 /**
  * Invoked immediately following a command being sent.
  *
  * @param \Swift_Events_CommandEvent $evt
  */
 public function commandSent(\Swift_Events_CommandEvent $evt)
 {
     $level = $this->levels['commandSent'];
     $command = $evt->getCommand();
     $this->log($level, sprintf(">> %s", $command));
 }
 /**
  * Invoked immediately following a command being sent.
  *
  * @param Swift_Events_CommandEvent $evt
  */
 public function commandSent(Swift_Events_CommandEvent $evt)
 {
     $command = $evt->getCommand();
     $this->_out += strlen($command);
 }
Example #5
0
 /**
  * Invoked immediately following a command being sent.
  *
  * @param \Swift_Events_CommandEvent $evt
  */
 public function commandSent(\Swift_Events_CommandEvent $evt)
 {
     $this->log[] = '> ' . $evt->getCommand();
 }