mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-21 16:46:11 +02:00
Add TagProcessor::addTags and TagProcessor::setTags, fixes #588
This commit is contained in:
@@ -21,6 +21,16 @@ class TagProcessor
|
||||
private $tags;
|
||||
|
||||
public function __construct(array $tags = array())
|
||||
{
|
||||
$this->setTags($tags);
|
||||
}
|
||||
|
||||
public function addTags(array $tags = array())
|
||||
{
|
||||
$this->tags = array_values(array_unique(array_merge($this->tags, $tags)));
|
||||
}
|
||||
|
||||
public function setTags(array $tags = array())
|
||||
{
|
||||
$this->tags = $tags;
|
||||
}
|
||||
|
Reference in New Issue
Block a user