Add filter conditions using a class

This commit is contained in:
Oliver Davies 2019-05-03 21:02:13 +01:00
parent 22b696d47c
commit 5d5d5118ef
3 changed files with 146 additions and 78 deletions

View file

@ -0,0 +1,30 @@
<?php
namespace Opdavies\GmailFilterBuilder\Model;
use Tightenco\Collect\Support\Collection;
class FilterCondition
{
/** @var string */
private $property;
/** @var Collection */
private $values;
public function __construct(string $property, $values)
{
$this->property = $property;
$this->values = collect($values);
}
public function getProperty(): string
{
return $this->property;
}
public function getValues(): Collection
{
return $this->values;
}
}