public function addCopyRecord (CopyRecord $record)
    {
        if ($this->getCopyRecordByItemNumber($record->getItemNumber())) {
            throw new InvalidArgumentException("Cannot add copy record: Copy record with item number {$record->getItemNumber()} already present");
        }
        $this->addRecord($record);
        $record->setLocalRecord($this);
    }
public function addCopyRecord (CopyRecord $record)
    {
        if ($this->getCopyRecordByItemNumber($record->getItemNumber())) {
            throw new InvalidArgumentException("Cannot add copy record: Copy record with item number {$record->getItemNumber()} already present");
        }
        $this->addRecord($record);
        $record->setLocalRecord($this);
    }
public function addCopyRecord ( CopyRecord $ record ) { if ( $ this -> getCopyRecordByItemNumber ( $ record -> getItemNumber ( ) ) ) { throw new InvalidArgumentException ( "Cannot add copy record: Copy record with item number {$record->getItemNumber()} already present" ) ; } $ this -> addRecord ( $ record ) ; $ record -> setLocalRecord ( $ this ) ; }
Add a copy record.

@throws InvalidArgumentException Record already contains the copy record
@throws InvalidArgumentException Record already contains a copy record with the same item number

@param  CopyRecord $record Copy record to add
@return void
Add a copy record .