1 | <?php |
||
13 | abstract class DataDocument extends Document { |
||
14 | /** @var ResourceObject[] */ |
||
15 | protected $includedResources = []; |
||
16 | /** @var Validator */ |
||
17 | protected $validator; |
||
18 | |||
19 | public function __construct() { |
||
24 | |||
25 | /** |
||
26 | * human api |
||
27 | */ |
||
28 | |||
29 | /** |
||
30 | * spec api |
||
31 | */ |
||
32 | |||
33 | /** |
||
34 | * mainly used when an `included` query parameter is passed |
||
35 | * and resources are requested separate from what is standard for a response |
||
36 | * |
||
37 | * @param ResourceObject ...$resourceObjects |
||
38 | */ |
||
39 | public function addIncludedResourceObject(ResourceObject ...$resourceObjects) { |
||
52 | |||
53 | /** |
||
54 | * internal api |
||
55 | */ |
||
56 | |||
57 | /** |
||
58 | * DocumentInterface |
||
59 | */ |
||
60 | |||
61 | /** |
||
62 | * @inheritDoc |
||
63 | */ |
||
64 | public function toArray() { |
||
78 | } |
||
79 |