1
0
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:
Jordi Boggiano
2015-07-12 11:55:38 +01:00
parent b941eac988
commit 66532794b0
2 changed files with 30 additions and 0 deletions

View File

@@ -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;
}