Exemple #1
0
 /**
  * Convert message fields to request fields.
  *
  * @param  MessageInterface $message
  * @return string[]
  */
 protected function buildPostData(MessageInterface $message)
 {
     return array_filter(['ip' => $message->getIP(), 'agent' => $message->getUserAgent(), 'name' => $message->getName(), 'subject' => $message->getSubject(), 'link' => $message->getHomepage(), 'comment' => $message->getBody(), 'site' => $message->getOrigin()]);
 }
Exemple #2
0
 /**
  * Convert message fields to request fields.
  *
  * @param  MessageInterface $message
  * @return string[]
  */
 protected function buildGetData(MessageInterface $message)
 {
     return array_filter(['ip' => $message->getIP(), 'name' => $message->getName(), 'mail' => $message->getEmail()]);
 }