/**
  * @param Message $message
  * @return Boolean
  */
 public function has(Message $message)
 {
     if (!$this->hasDomain($message->getDomain())) {
         return false;
     }
     return $this->getDomain($message->getDomain())->has($message->getId());
 }
 public function testGetDomain()
 {
     $message = new Message('foo', 'bar');
     $this->assertEquals('bar', $message->getDomain());
 }
 /**
  * @param $message
  * @return Message\XliffMessage
  */
 private function makeXliffMessage(Message $message)
 {
     $newMessage = new Message\XliffMessage($message->getId(), $message->getDomain());
     $newMessage->setNew($message->isNew());
     $newMessage->setLocaleString($message->getLocaleString());
     $newMessage->setSources($message->getSources());
     $newMessage->addNote('key: ' . $message->getId());
     if ($desc = $message->getDesc()) {
         $newMessage->setDesc($desc);
     }
     return $newMessage;
 }