/** * Adds a parent child relationship between the two persons and applies the specified fact. * * @param PersonState $parent * @param PersonState $child * @param Fact $fact * @param StateTransitionOption $option,... * * @return RelationshipState|null */ public function AddParentChildRelationship(PersonState $parent, PersonState $child, Fact $fact = null, StateTransitionOption $option = null) { $relationship = new Relationship(); $relationship->setPerson1(new ResourceReference($parent->getSelfUri())); $relationship->setPerson2(new ResourceReference($child->getSelfUri())); $relationship->setKnownType(RelationshipType::PARENTCHILD); if ($fact != null) { $relationship->addFact($fact); } return $this->passOptionsTo('addRelationship', array($relationship), func_get_args()); }