1 | <?php |
||
6 | final class MatchContentCriterion implements CriterionInterface |
||
7 | { |
||
8 | |||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $query; |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $name; |
||
17 | |||
18 | /** |
||
19 | * BodyCriterium constructor. |
||
20 | * @param string $name |
||
21 | * @param string $query |
||
22 | */ |
||
23 | 17 | private function __construct(string $name, string $query) |
|
32 | |||
33 | /** |
||
34 | * @return string |
||
35 | */ |
||
36 | 10 | public function __toString(): string |
|
44 | |||
45 | /** |
||
46 | * @param string $query |
||
47 | * @return MatchContentCriterion |
||
48 | */ |
||
49 | 6 | public static function body(string $query): self |
|
53 | |||
54 | /** |
||
55 | * @param string $query |
||
56 | * @return MatchContentCriterion |
||
57 | */ |
||
58 | 10 | public static function text(string $query): self |
|
62 | |||
63 | /** |
||
64 | * @param string $query |
||
65 | * @return MatchContentCriterion |
||
66 | */ |
||
67 | 1 | public static function subject(string $query): self |
|
71 | } |