| 1 | <?php |
||
| 11 | class Specification |
||
| 12 | { |
||
| 13 | use QueryTrait; |
||
| 14 | |||
| 15 | public $requestedRelations = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var FieldValidatorFactory |
||
| 19 | */ |
||
| 20 | private $fieldValidatorFactory; |
||
| 21 | |||
| 22 | function __construct(FieldValidatorFactory $fieldValidatorFactory) |
||
| 26 | |||
| 27 | public function requestRelation($name) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param Query $query |
||
| 34 | * @return Query |
||
| 35 | */ |
||
| 36 | public function applyTo($query) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param Query $query |
||
| 51 | * @throws FieldValidationException |
||
| 52 | */ |
||
| 53 | public function applyWhereTo($query) |
||
| 75 | } |
||
| 76 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.