public function addSubfield (\HAB\Pica\Record\Subfield $subfield) 
    {
        if (in_array($subfield, $this->getSubfields(), true)) {
            throw new InvalidArgumentException("Cannot add subfield: Subfield already part of the subfield list");
        }
        $this->_subfields []= $subfield;
    }
public function addSubfield (\HAB\Pica\Record\Subfield $subfield) 
    {
        if (in_array($subfield, $this->getSubfields(), true)) {
            throw new InvalidArgumentException("Cannot add subfield: Subfield already part of the subfield list");
        }
        $this->_subfields []= $subfield;
    }
public function addSubfield ( \ HAB \ Pica \ Record \ Subfield $ subfield ) { if ( in_array ( $ subfield , $ this -> getSubfields ( ) , true ) ) { throw new InvalidArgumentException ( "Cannot add subfield: Subfield already part of the subfield list" ) ; } $ this -> _subfields [ ] = $ subfield ; }
Add a subfield to the end of the subfield list.

@throws InvalidArgumentException Subfield already present in subfield list
@param  \HAB\Pica\Record\Subfield $subfield Subfield to add
@return void
Add a subfield to the end of the subfield list .