rcrowe\Hippy\Message\MessageInterface::getNotification PHP Method

getNotification() public method

Will this message generate a notification.
public getNotification ( ) : boolean
return boolean
    public function getNotification();

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function send(MessageInterface $message)
 {
     // Validate we have everything we need
     foreach (array('token', 'room', 'from') as $variable) {
         if (empty($this->{$variable})) {
             throw new InvalidArgumentException("Invalid `{$variable}`");
         }
     }
     // Build up the data we are sending to Hipchat
     $data = array('room_id' => $this->getRoom(), 'from' => $this->getFrom(), 'message' => $message->getMessage(), 'message_format' => $message->getMessageFormat(), 'notify' => $message->getNotification(), 'color' => $message->getBackgroundColor(), 'format' => 'json');
     $data = http_build_query($data, '', '&');
     return $this->http->post($this->getUri(), $this->getHeaders(), $data)->send();
 }