class RelationshipFiller (View source)

Facilitates filling relationships for multiple records at the same time.

Methods

__construct(Connection $connection)

RelationshipFiller constructor.

void
fill(array $records, array $relationships)

Fills the given relationships for all records of a single type.

Details

__construct(Connection $connection)

RelationshipFiller constructor.

Parameters

Connection $connection Connection used to load data for the records from the database

void fill(array $records, array $relationships)

Fills the given relationships for all records of a single type.

Parameters

array $records List of records that must all belong to the same schema
array $relationships List of relationships to fill with deeper levels separated by periods

Return Value

void