public function alert($channelNames, $message, $tos = ['@dee'])
  {

    $to = implode(',', $tos);
    foreach ($channelNames as $channelName) {
      $channelKey = $this->lookupChannelKey($channelName);
      $slack = new Client($channelKey);
      $slack->to($to)->attach($message)->send();
      $this->statHat->ezCount('MB_Toolbox: MB_Slack: alert', 1);
    }
  }
public function alert($channelNames, $message, $tos = ['@dee'])
  {

    $to = implode(',', $tos);
    foreach ($channelNames as $channelName) {
      $channelKey = $this->lookupChannelKey($channelName);
      $slack = new Client($channelKey);
      $slack->to($to)->attach($message)->send();
      $this->statHat->ezCount('MB_Toolbox: MB_Slack: alert', 1);
    }
  }
public function alert ( $ channelNames , $ message , $ tos = [ '@dee' ] ) { $ to = implode ( ',' , $ tos ) ; foreach ( $ channelNames as $ channelName ) { $ channelKey = $ this -> lookupChannelKey ( $ channelName ) ; $ slack = new Client ( $ channelKey ) ; $ slack -> to ( $ to ) -> attach ( $ message ) -> send ( ) ; $ this -> statHat -> ezCount ( 'MB_Toolbox: MB_Slack: alert' , 1 ) ; } }
Send report to Slack.

$param array $to
Comma separated list of Slack channels ("#") and/or users ("@") to send message to.
@param string $message
List of message attachment options. https://github.com/maknz/slack#send-an-attachment-with-fields
@param array $channelNames
The name of the channel to send the message to.
Send report to Slack .