/** * Builds the relationship object based on user schema * * @param array $relInfo relationship info from user schema * @return Relationship */ public function buildRelationship(array $relInfo) { $relationship = new Relationship($relInfo['start'], $relInfo['end'], $relInfo['type']); $relationship->setCardinality($relInfo['mode']); if (isset($relInfo['properties'])) { foreach ($relInfo['properties'] as $name => $info) { $property = $this->buildRelationshipProperty($name, $info); $relationship->addProperty($property); } } return $relationship; }