Relationship
class Relationship (View source)
Represents a relationship between two schemas.
Methods
__construct(string $name, Schema $schema, array $fields, Schema $referencedSchema, array $referencedFields, bool $unique)
Relationship constructor.
string
getName()
Returns the name of the relationship.
array
getFields()
Returns the referring fields.
getReferencedSchema()
Returns the referenced schema.
array
getReferencedFields()
Returns referenced fields.
bool
isUniqueRelationship()
Tells if the relationship is unique or not.
getReverseRelationship()
Returns the reverse relationship.
void
fillRelationship(array $records, array $referencedRecords)
Fills this relationship for the given records from the list of given records.
void
fillSingleRecord(Record $record, Record $referencedRecord)
Fills this unique relationship for a single record.
Details
at line 45
__construct(string $name, Schema $schema, array $fields, Schema $referencedSchema, array $referencedFields, bool $unique)
Relationship constructor.
at line 81
string
getName()
Returns the name of the relationship.
at line 99
array
getFields()
Returns the referring fields.
at line 117
array
getReferencedFields()
Returns referenced fields.
at line 126
bool
isUniqueRelationship()
Tells if the relationship is unique or not.
at line 135
Relationship
getReverseRelationship()
Returns the reverse relationship.
at line 182
void
fillRelationship(array $records, array $referencedRecords)
Fills this relationship for the given records from the list of given records.