示例#1
0
 /**
  * Set the containing local record.
  *
  * @param  LocalRecord $record Local record
  * @return void
  */
 public function setLocalRecord(LocalRecord $record)
 {
     $this->unsetLocalRecord();
     if (!$record->containsCopyRecord($this)) {
         $record->addCopyRecord($this);
     }
     $this->_parent = $record;
 }
示例#2
0
 public function testContainsCopyRecord()
 {
     $r = new LocalRecord();
     $c = new CopyRecord();
     $this->assertFalse($r->containsCopyRecord($c));
     $r->addCopyRecord($c);
     $this->assertTrue($r->containsCopyRecord($c));
 }