コード例 #1
0
ファイル: KVDthes_MatchesTest.php プロジェクト: Tjoosten/kvd
 public function testGetImmutableCollection()
 {
     $coll = $this->object->getImmutableCollection();
     $this->assertInstanceOf('KVDdom_DomainObjectCollection', $coll);
     $this->assertEquals(0, count($coll));
     $this->object->addMatch($this->match);
     $this->assertEquals(0, count($coll));
 }
コード例 #2
0
 /**
  * addMatch
  *
  * @param KVDthes_Match $match
  * @return void
  */
 public function addMatch(KVDthes_Match $match)
 {
     $this->checkMatches();
     if ($this->matches->addMatch($match)) {
         //maak de inverse match aan
         $match->getMatchable()->addMatch(new KVDthes_Match($match->getInverseMatch(), $this));
         $this->markDirty();
     }
 }