Skip to content

Commit 985fdb3

Browse files
committed
Add getter for webhook and token property
1 parent 1107013 commit 985fdb3

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/Monolog/Handler/SlackHandler.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class SlackHandler extends SocketHandler
2727
* Slack API token
2828
* @var string
2929
*/
30-
protected $token;
30+
private $token;
3131

3232
/**
3333
* Instance of the SlackRecord util class preparing data for Slack API.
3434
* @var SlackRecord
3535
*/
36-
protected $slackRecord;
36+
private $slackRecord;
3737

3838
/**
3939
* @param string $token Slack API token
@@ -75,6 +75,11 @@ public function getSlackRecord()
7575
return $this->slackRecord;
7676
}
7777

78+
public function getToken()
79+
{
80+
return $this->token;
81+
}
82+
7883
/**
7984
* {@inheritdoc}
8085
*

src/Monolog/Handler/SlackWebhookHandler.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class SlackWebhookHandler extends AbstractProcessingHandler
2727
* Slack Webhook token
2828
* @var string
2929
*/
30-
protected $webhookUrl;
30+
private $webhookUrl;
3131

3232
/**
3333
* Instance of the SlackRecord util class preparing data for Slack API.
3434
* @var SlackRecord
3535
*/
36-
protected $slackRecord;
36+
private $slackRecord;
3737

3838
/**
3939
* @param string $webhookUrl Slack Webhook URL
@@ -70,6 +70,11 @@ public function getSlackRecord()
7070
return $this->slackRecord;
7171
}
7272

73+
public function getWebhookUrl()
74+
{
75+
return $this->webhookUrl;
76+
}
77+
7378
/**
7479
* {@inheritdoc}
7580
*

0 commit comments

Comments
 (0)