mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-11-11 21:08:45 +00:00
Add filter conditions using a class
This commit is contained in:
parent
22b696d47c
commit
5d5d5118ef
3 changed files with 146 additions and 78 deletions
30
src/Model/FilterCondition.php
Normal file
30
src/Model/FilterCondition.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue