mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-19 23:56:17 +02:00
Merge remote-tracking branch 'EspadaV8/add-fluent-setters-for-slack-handler'
This commit is contained in:
@@ -174,4 +174,59 @@ class SlackHandler extends SocketHandler
|
||||
|
||||
return $formatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Channel used by the bot when posting
|
||||
*/
|
||||
public function setChannel(string $channel): self
|
||||
{
|
||||
$this->slackRecord->setChannel($channel);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Username used by the bot when posting
|
||||
*/
|
||||
public function setUsername(string $username): self
|
||||
{
|
||||
$this->slackRecord->setUsername($username);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function useAttachment(bool $useAttachment): self
|
||||
{
|
||||
$this->slackRecord->useAttachment($useAttachment);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setIconEmoji(string $iconEmoji): self
|
||||
{
|
||||
$this->slackRecord->setUserIcon($iconEmoji);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function useShortAttachment(bool $useShortAttachment): self
|
||||
{
|
||||
$this->slackRecord->useShortAttachment($useShortAttachment);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function includeContextAndExtra(bool $includeContextAndExtra): self
|
||||
{
|
||||
$this->slackRecord->includeContextAndExtra($includeContextAndExtra);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function excludeFields(array $excludeFields): self
|
||||
{
|
||||
$this->slackRecord->excludeFields($excludeFields);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user