Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2.  
  3. namespace AppBundle\Domain\Feed\Rules;
  4.  
  5. use Aura\SqlQuery\Common\SelectInterface;
  6. use CCMBenchmark\TingRules\Rule;
  7.  
  8. class IsEnabled implements Rule
  9. {
  10. public function getRule(): string
  11. {
  12. return "enabled = '1'";
  13. }
  14.  
  15. public function getParameters(): array
  16. {
  17. return [];
  18. }
  19.  
  20. public function applyRule( SelectInterface $queryBuilder, string $rule, array $parameters = []): SelectInterface {
  21. return $queryBuilder
  22. ->where($rule)
  23. ->bindValues($parameters);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement