Last active
May 28, 2019 09:04
-
-
Save Koc/2083ce1b749e3c4c9c2b399d0f14c234 to your computer and use it in GitHub Desktop.
Specificator Aggregations
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
<?php | |
namespace Brouzie\Specificator; | |
interface FiltersResettableAggregation | |
{ | |
/** | |
* Returns true for filters that prevent building this aggregation, false otherwise. | |
*/ | |
public function isFilterShouldBeExcluded(object $filter): bool; | |
} |
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
<?php | |
namespace App\Product\Application\Query\Aggregation; | |
use App\Application\Query\Product\Filter\PriceRangeFilter; | |
use Brouzie\Specificator\FiltersResettingAggregation; | |
class PriceRangeAggregation implements FiltersResettingAggregation | |
{ | |
public function isFilterShouldBeExcluded(object $filter): bool | |
{ | |
return $filter instanceof PriceRangeFilter; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment