Added method to remove attribute
This commit is contained in:
parent
c2ae486632
commit
dd693d59fc
1 changed files with 20 additions and 0 deletions
|
@ -121,6 +121,26 @@ class Document extends ArrayObject
|
||||||
return $this;
|
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.
|
* Search.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue