public function removeSubfield (\HAB\Pica\Record\Subfield $subfield) 
    {
        $index = array_search($subfield, $this->_subfields, true);
        if ($index === false) {
            throw new InvalidArgumentException("Cannot remove subfield: Subfield not part of the subfield list");
        }
        unset($this->_subfields[$index]);
    }
public function removeSubfield (\HAB\Pica\Record\Subfield $subfield) 
    {
        $index = array_search($subfield, $this->_subfields, true);
        if ($index === false) {
            throw new InvalidArgumentException("Cannot remove subfield: Subfield not part of the subfield list");
        }
        unset($this->_subfields[$index]);
    }
public function removeSubfield ( \ HAB \ Pica \ Record \ Subfield $ subfield ) { $ index = array_search ( $ subfield , $ this -> _subfields , true ) ; if ( $ index === false ) { throw new InvalidArgumentException ( "Cannot remove subfield: Subfield not part of the subfield list" ) ; } unset ( $ this -> _subfields [ $ index ] ) ; }
Remove a subfield.

@throws InvalidArgumentException Subfield is not part of the subfield list
@param  \HAB\Pica\Record\Subfield $subfield Subfield to delete
@return void
Remove a subfield .