class Populator

Service class for populating a database using Mandango.

A Populator can populate several tables using ActiveRecord classes.

Methods

__construct( Generator $generator, Mandango $mandango)

No description

addEntity($entity, $number, $customColumnFormatters = array())

Add an order for the generation of $number records for $entity.

array
execute()

Populate the database using all the Entity classes previously added.

Details

__construct( Generator $generator, Mandango $mandango)

Parameters

Generator $generator
Mandango $mandango

addEntity($entity, $number, $customColumnFormatters = array())

Add an order for the generation of $number records for $entity.

Parameters

$entity
$number
$customColumnFormatters

array execute()

Populate the database using all the Entity classes previously added.

Return Value

array A list of the inserted entities.