| 1 | <?php |
||
| 6 | final class CommunicatorCriterion implements CriterionInterface |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | private $name; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | private $query; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $name |
||
| 20 | * @param string $query |
||
| 21 | */ |
||
| 22 | 5 | private function __construct(string $name, string $query) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | 5 | public function __toString(): string |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $query |
||
| 38 | * @return CommunicatorCriterion |
||
| 39 | */ |
||
| 40 | 2 | public static function to(string $query): self |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $query |
||
| 47 | * @return CommunicatorCriterion |
||
| 48 | */ |
||
| 49 | 1 | public static function cc(string $query): self |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @param string $query |
||
| 56 | * @return CommunicatorCriterion |
||
| 57 | */ |
||
| 58 | 1 | public static function bcc(string $query): self |
|
| 62 | |||
| 63 | /** |
||
| 64 | * @param string $query |
||
| 65 | * @return CommunicatorCriterion |
||
| 66 | */ |
||
| 67 | 1 | public static function from(string $query): self |
|
| 71 | } |
||
| 72 |