diff --git a/src/Database/Document.php b/src/Database/Document.php index 1f7b5ff4a8..76e028c44e 100644 --- a/src/Database/Document.php +++ b/src/Database/Document.php @@ -121,6 +121,26 @@ class Document extends ArrayObject return $this; } + /** + * Remove Attribute. + * + * Method for removing a specific field attribute + * + * @param string $key + * @param mixed $value + * @param string $type + * + * @return mixed + */ + public function removeAttribute($key) + { + if(isset($this[$key])) { + unset($this[$key]); + } + + return $this; + } + /** * Search. *