Elgg  Version 5.0
Public Member Functions | Protected Attributes | List of all members
Elgg\Database\Seeder Class Reference

Seeder class. More...

Public Member Functions

 __construct (EventsService $events, Progress $progress, Invoker $invoker)
 Seeder constructor. More...
 seed (array $options=[])
 Load seed scripts. More...
 unseed (array $options=[])
 Remove all seeded entities. More...
 getSeederClasses ()
 Get the class names of all registered seeders (verified to work for seeding) More...

Protected Attributes

EventsService $events
Progress $progress
Invoker $invoker

Detailed Description

Seeder class.

Populates the database with rows for testing

Definition at line 17 of file Seeder.php.

Constructor & Destructor Documentation

Elgg\Database\Seeder::__construct ( EventsService  $events,
Progress  $progress,
Invoker  $invoker 

Seeder constructor.

EventsService$eventsEvents service
Progress$progressProgress helper
Invoker$invokerInvoker service

Definition at line 32 of file Seeder.php.

Member Function Documentation

Elgg\Database\Seeder::getSeederClasses ( )

Get the class names of all registered seeders (verified to work for seeding)


Definition at line 138 of file Seeder.php.

Elgg\Database\Seeder::seed ( array  $options = [])

Load seed scripts.

array$optionsoptions for seeding
  • limit: the max number of entities to seed
  • image_folder: a global (local) image folder to use for image seeding (user/group profile icon, etc)
  • type: only seed this content type
  • create: create new entities (default: false)
  • create_since: lower bound creation time (default: now)
  • create_until: upper bound creation time (default: now)

Definition at line 55 of file Seeder.php.

Elgg\Database\Seeder::unseed ( array  $options = [])

Remove all seeded entities.

array$optionsunseeding options
  • type: only unseed this content type

Definition at line 104 of file Seeder.php.

Member Data Documentation

EventsService Elgg\Database\Seeder::$events

Definition at line 19 of file Seeder.php.

Invoker Elgg\Database\Seeder::$invoker

Definition at line 23 of file Seeder.php.

Progress Elgg\Database\Seeder::$progress

Definition at line 21 of file Seeder.php.

The documentation for this class was generated from the following file: