for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Threema GmbH
* @copyright Copyright (c) 2015-2016 Threema GmbH
*/
namespace Threema\MsgApi\Helpers;
use Threema\MsgApi\Messages\ThreemaMessage;
class ReceiveMessageResult {
* @var ThreemaMessage
private $threemaMessage;
* @var string[]
private $files = array();
private $errors = array();
* @var string
private $messageId;
* @param string $messageId
* @param ThreemaMessage $threemaMessage
public function __construct($messageId, ThreemaMessage $threemaMessage) {
$this->threemaMessage = $threemaMessage;
$this->messageId = $messageId;
}
* @return string
public function getMessageId() {
return $this->messageId;
* @param $message
* @return $this
public function addError($message) {
$this->errors[] = $message;
return $this;
* @return bool
public function isSuccess() {
return null === $this->errors || count($this->errors) == 0;
* @param string $key
* @param string $file
public function addFile($key, $file) {
$this->files[$key] = $file;
* @return \string[]
public function getErrors() {
return $this->errors;
* @return ThreemaMessage
public function getThreemaMessage() {
return $this->threemaMessage;
public function getFiles() {
return $this->files;