1 | <?php |
||
8 | class Validators extends AbstractValidatorProvider |
||
9 | { |
||
10 | /** |
||
11 | * Get the validation rules for the resource attributes. |
||
12 | * |
||
13 | * @param string $resourceType |
||
14 | * the resource type being validated |
||
15 | * @param object|null $record |
||
16 | * the record being updated, or null if it is a create request. |
||
17 | * |
||
18 | * @return array |
||
19 | */ |
||
20 | protected function attributeRules($resourceType, $record = null) |
||
26 | |||
27 | /** |
||
28 | * Define the validation rules for the resource relationships. |
||
29 | * |
||
30 | * @param RelationshipsValidatorInterface $relationships |
||
31 | * @param string $resourceType |
||
32 | * the resource type being validated |
||
33 | * @param object|null $record |
||
34 | * the record being updated, or null if it is a create request. |
||
35 | * |
||
36 | * @return void |
||
37 | */ |
||
38 | protected function relationshipRules(RelationshipsValidatorInterface $relationships, $resourceType, $record = null) |
||
42 | } |
||
43 |