Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature / support for multiple Raygun App Keys
- Loading branch information
Showing
6 changed files
with
106 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace SilverStripe\Raygun; | ||
|
||
trait CustomAppKeyProvider | ||
{ | ||
/** | ||
* Use a custom APP Key instead of the globally defined SS_RAYGUN_APP_KEY | ||
* | ||
* @var null|string | ||
*/ | ||
private $customRaygunAppKey; | ||
|
||
/** | ||
* Set a custom raygun app key that should be used instead of the | ||
* global default | ||
* | ||
* @param string $key | ||
* | ||
* @return $this | ||
*/ | ||
public function setCustomRaygunAppKey(string $key): self | ||
{ | ||
$this->customRaygunAppKey = $key; | ||
return $this; | ||
} | ||
|
||
/** | ||
* Returns the custom raygun app key if set | ||
* | ||
* @return null|string | ||
*/ | ||
public function getCustomRaygunAppKey(): ?string | ||
{ | ||
return $this->customRaygunAppKey; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters