1 | <?php |
||
23 | class ResourceMetadata extends ClassMetadata implements ResourceMetadataInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var string |
||
27 | * @internal |
||
28 | */ |
||
29 | public $name; |
||
30 | |||
31 | /** |
||
32 | * @var PropertyMetadataInterface[] |
||
33 | * @internal |
||
34 | */ |
||
35 | public $attributes = []; |
||
36 | |||
37 | /** |
||
38 | * @var PropertyMetadataInterface[] |
||
39 | * @internal |
||
40 | */ |
||
41 | public $relationships = []; |
||
42 | |||
43 | /** |
||
44 | * @inheritdoc |
||
45 | */ |
||
46 | 1 | public function getName() |
|
50 | |||
51 | /** |
||
52 | * @param string $name |
||
53 | * @return $this |
||
54 | */ |
||
55 | 3 | public function setName($name = null) |
|
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | 2 | public function getAttributes() |
|
69 | |||
70 | /** |
||
71 | * Add resource attribute metadata |
||
72 | * |
||
73 | * @param PropertyMetadataInterface $attribute |
||
74 | * @return $this |
||
75 | */ |
||
76 | 3 | public function addAttribute(PropertyMetadataInterface $attribute) |
|
82 | |||
83 | /** |
||
84 | * @inheritdoc |
||
85 | */ |
||
86 | 2 | public function getRelationships() |
|
90 | |||
91 | /** |
||
92 | * Add resource relationship metadata |
||
93 | * |
||
94 | * @param PropertyMetadataInterface $relationship |
||
95 | * @return $this |
||
96 | */ |
||
97 | 3 | public function addRelationship(PropertyMetadataInterface $relationship) |
|
103 | |||
104 | /** |
||
105 | * @inheritdoc |
||
106 | */ |
||
107 | 2 | public function mergeMetadata($metadata = null) |
|
129 | } |