public function visitRelation(KVDthes_Relation $relation) { $relNode = $this->dom->createElement('relation'); $relNode->appendChild($this->createRelationType($relation->getType())); $relNode->appendChild($this->createTermId($relation->getTerm()->getId())); $relNode->appendChild($this->createTermName($relation->getTerm()->getTerm())); $this->term->appendChild($this->createTermType($node->getType()->getId())); $relNode->appendChild($this->createTermLanguage('nl-BE')); $this->term->appendChild($relNode); return true; }
/** * visitRelation * * @param KVDthes_Relation $relation * @return boolean */ public function visitRelation(KVDthes_Relation $relation) { $this->result[] = array('id_from' => $this->from, 'rel_type' => $relation->getType(), 'id_to' => $relation->getTerm()->getId()); return true; }
/** * equals * * @param KVDthes_Relation $relation * @return void */ public function equals(KVDthes_Relation $relation) { return $relation->getTerm() === $this->getTerm() && $relation->getType() === $this->getType(); }
public function testGetType() { $this->assertEquals($this->object->getType(), KVDthes_Relation::REL_RT); }