Exemplo n.º 1
0
 public function testCountWithType()
 {
     $this->assertEquals($this->object->count(KVDthes_Relation::REL_RT), 0);
     $this->object->addRelation($this->relation);
     $this->assertEquals($this->object->count(KVDthes_Relation::REL_RT), 1);
     $this->assertEquals($this->object->count(KVDthes_Relation::REL_NT), 0);
 }
Exemplo n.º 2
0
 /**
  * hasRelations
  *
  * @since   18 apr 2009
  * @param   string      $type   Een constante uit {@link KVDthes_Relation} of null
  * @return  boolean     Geeft aan of een term relaties heeft in het algemeen of van een bepaald type.
  */
 public function hasRelations($type = null)
 {
     $this->checkRelations();
     return $this->relations->count($type) > 0;
 }