*/ class LtiMessage { /** * @var string */ protected $log; /** * @var string */ protected $message; /** * LtiMessage constructor. * @param $message * @param $log */ public function __construct($message, $log) { $this->message = $message; $this->log = $log; } /** * @return string */ public function getMessage() { return $this->message; } /** * @return string */ public function getLog() { return $this->log; } /** * @return array */ public function getUrlParams() { $params = []; if (!empty($this->getMessage())) { $params['lti_msg'] = $this->getMessage(); } if (!empty($this->getLog())) { $params['lti_log'] = $this->getLog(); } return $params; } }