Ejemplo n.º 1
0
 /**
  * Log a SMS.
  *
  * @param Resultinterface $sms            The SMS to log.
  * @param float           $duration       The time required to send the SMS (in seconds).
  * @param string          $provider_class The class name of the provider which sent the SMS.
  */
 public function logMessage(ResultInterface $sms, $duration, $provider_class)
 {
     $this->smsList[] = array('sms' => $sms, 'duration' => $duration, 'provider_class' => $provider_class);
     if ($this->logger !== null) {
         $message = sprintf('SMS sent to %s, from %s %0.2f ms (%s), status: %s', $sms->getRecipient(), $sms->getOriginator(), $duration * 1000, $provider_class, $sms->getStatus());
         $this->logger->info($message);
     }
 }