\CodeIgniter\DatabaseSeeder

Class Seeder

Summary

Methods
Properties
Constants
__construct()
call()
setPath()
setSilent()
run()
No public properties found
No constants found
No protected methods found
$DBGroup
$seedPath
$config
$db
$forge
$silent
N/A
No private methods found
No private properties found
N/A

Properties

$DBGroup

$DBGroup : string

The name of the database group to use.

Type

string

$seedPath

$seedPath : string

Where we can find the Seed files.

Type

string

$silent

$silent : boolean

If true, will not display CLI messages.

Type

boolean

Methods

call()

call(string  $class) 

Loads the specified seeder and runs it.

Parameters

string $class

Throws

\InvalidArgumentException

setPath()

setPath(string  $path) : \CodeIgniter\Database\Seeder

Sets the location of the directory that seed files can be located in.

Parameters

string $path

Returns

\CodeIgniter\Database\Seeder

setSilent()

setSilent(boolean  $silent) : \CodeIgniter\Database\Seeder

Sets the silent treatment.

Parameters

boolean $silent

Returns

\CodeIgniter\Database\Seeder

run()

run() : mixed

Run the database seeds. This is where the magic happens.

Child classes must implement this method and take care of inserting their data here.

Returns

mixed