mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-07 13:46:38 +02:00
Making SlackHandler more extendable
This commit is contained in:
@@ -120,6 +120,19 @@ class SlackHandler extends SocketHandler
|
||||
* @return string
|
||||
*/
|
||||
private function buildContent($record)
|
||||
{
|
||||
$dataArray = $this->prepareContentData($record);
|
||||
|
||||
return http_build_query($dataArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares content data
|
||||
*
|
||||
* @param array $record
|
||||
* @return array
|
||||
*/
|
||||
protected function prepareContentData($record)
|
||||
{
|
||||
$dataArray = array(
|
||||
'token' => $this->token,
|
||||
@@ -206,8 +219,7 @@ class SlackHandler extends SocketHandler
|
||||
if ($this->iconEmoji) {
|
||||
$dataArray['icon_emoji'] = ":{$this->iconEmoji}:";
|
||||
}
|
||||
|
||||
return http_build_query($dataArray);
|
||||
return $dataArray;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user