Author: Chris Corbyn (chris@w3style.co.uk)
Inheritance: extends Swift_Events
 /**
  * Invoked immediately following a response coming back.
  *
  * @param Swift_Events_ResponseEvent $evt
  */
 public function responseReceived(Swift_Events_ResponseEvent $evt)
 {
     $response = $evt->getResponse();
     $this->_logger->add(sprintf('<< %s', $response));
 }
Esempio n. 2
0
 /**
  * Set the extensions which the service reports in the connection object
  * @param Swift_Events_ResponseEvent The list of extensions as reported by the service
  */
 protected function setConnectionExtensions(Swift_Events_ResponseEvent $list)
 {
     $le = strpos($list->getString(), "\r\n") !== false ? "\r\n" : "\n";
     $list = explode($le, $list->getString());
     for ($i = 1, $len = count($list); $i < $len; $i++) {
         $extension = substr($list[$i], 4);
         $attributes = preg_split("![ =]!", $extension);
         $this->connection->setExtension($attributes[0], isset($attributes[1]) ? array_slice($attributes, 1) : array());
     }
 }
 /**
  * Response listener method
  * @param Swift_Events_ResponseEvent The event occured in Swift
  */
 public function responseReceived(Swift_Events_ResponseEvent $e)
 {
     $this->target->lastResponse = $e->getString();
     $this->target->responseCode = $e->getCode();
 }
 /**
  * Part of the interface which is notified when a response is received
  * @param Swift_Events_ResponseEvent
  */
 public function responseReceived(Swift_Events_ResponseEvent $e)
 {
     $bytes = strlen($e->getString()) + 2;
     $this->addBytesIn($bytes);
 }
 /**
  * Invoked immediately following a response coming back.
  *
  * @param Swift_Events_ResponseEvent $evt
  */
 public function responseReceived(Swift_Events_ResponseEvent $evt)
 {
     $response = $evt->getResponse();
     $this->_in += strlen($response);
 }
Esempio n. 6
0
 public function responseReceived(\Swift_Events_ResponseEvent $event)
 {
     $callback = $this->callback;
     $callback($event->getResponse()->getMessage(), $event->getResponse()->getBody());
 }
 /**
  * Invoked immediately following a response coming back.
  *
  * @param \Swift_Events_ResponseEvent $evt
  */
 public function responseReceived(\Swift_Events_ResponseEvent $evt)
 {
     $level = $this->levels['responseReceived'];
     $response = $evt->getResponse();
     $this->log($level, sprintf("<< %s", $response));
 }