You are here

public function Messaging_Message::__toString in Messaging 7

Same name and namespace in other branches
  1. 6.4 includes/messaging_message.class.inc \Messaging_Message::__toString()
  2. 6.3 classes/messaging_message.class.inc \Messaging_Message::__toString()

File

./messaging.message.inc, line 744
Drupal Messaging Framework - Message class file

Class

Messaging_Message
Message class

Code

public function __toString() {
  $msid = isset($this->msid);
  $method = !empty($this->method) ? $this->method : '<none>';
  $destination = !empty($this->destination) ? implode('; ', array_keys($this->destination)) : '<none>';
  $text[] = "method= {$method}";
  $text[] = "destination= {$destination}";
  if (!empty($this->error)) {
    $text[] = " error={$this->error}";
  }
  return 'Message: ' . implode(' ', $text);
}