diff --git a/src/helpers/RequestParser.php b/src/helpers/RequestParser.php index 14a8373..a4abbc3 100644 --- a/src/helpers/RequestParser.php +++ b/src/helpers/RequestParser.php @@ -293,6 +293,18 @@ public function getAttribute($attributeName) { return $this->document['data']['attributes'][$attributeName]; } + /** + * @param string $attributeName + * @return mixed|null + */ + public function findAttribute($attributeName) { + if ($this->hasAttribute($attributeName) === false) { + return null; + } + + return $this->getAttribute($attributeName); + } + /** * @param string $relationshipName * @return boolean