class Populator

Service class for populating a database using the Propel ORM.

A Populator can populate several tables using ActiveRecord classes.

Methods

__construct( Generator $generator)

No description

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

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

array
execute( PropelPDO $con = null)

Populate the database using all the Entity classes previously added.

Details

__construct( Generator $generator)

Parameters

Generator $generator

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

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

Parameters

$entity
$number
$customColumnFormatters
$customModifiers

array execute( PropelPDO $con = null)

Populate the database using all the Entity classes previously added.

Parameters

PropelPDO $con A Propel connection object

Return Value

array A list of the inserted PKs