Skip to content

Commit f4c4294

Browse files
committed
1 parent 4b45f8e commit f4c4294

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/Item.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ public function hasAttributes(): bool
114114
return !empty($this->toArray());
115115
}
116116

117+
/**
118+
* @return Meta
119+
*/
120+
public function getDataMeta(): Meta
121+
{
122+
return $this->meta;
123+
}
124+
117125
/**
118126
* @return array
119127
*/

src/Parsers/ItemParser.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ function ($identifier) {
191191
throw new ValidationException(sprintf('ResourceIdentifier property "id" MUST be a string, "%s" given.', gettype($data->id)));
192192
}
193193

194-
return $this->getItemInstance($data->type)->setId($data->id);
194+
$item = $this->getItemInstance($data->type)->setId($data->id);
195+
if (property_exists($data, 'meta')) {
196+
$item->setMeta($this->metaParser->parse($data->meta));
197+
}
198+
199+
return $item;
195200
}
196201
}

0 commit comments

Comments
 (0)