Exemple #1
0
 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));
 }
 /**
  * removeMatches
  *
  * @param  KVDthes_Match $match
  * @return void
  */
 public function removeMatch(KVDthes_Match $match)
 {
     $this->checkMatches();
     if ($this->matches->removematch($match)) {
         //verwijder de inverse relatie
         $match->getMatchable()->removeMatch(new KVDthes_Match($match->getInverseMatch(), $this));
         $this->markDirty();
     }
 }
 /**
  * hasMatches
  *
  * @param  string  $type Een constante uit {@link KVDthes_Match} of null
  * @return boolean Geeft aan of een term matches heeft in het algemeen of van een bepaald type.
  */
 public function hasMatches($type = null)
 {
     $this->checkMatches();
     return $this->matches->count($type) > 0;
 }