Seed a database with some default data.

package Cactus
author Dave Widmer

 Methods

__construct()

__construct(string $path, Adapter $adapter) 
Inherited

inherited_from \Cactus\Task::__construct()

Parameters

$path

string

The path to the tasks folder

$adapter

\Cactus\Adapter

The adapter to connect to the data source

Runs all of the seed classes.

all() : array

Returns

array[[$name => (boolean) success]]

getAdapter()

getAdapter() : \Cactus\Adapter
Inherited

inherited_from \Cactus\Task::getAdapter()

Returns

\Cactus\AdapterThe adapter used to connect to the data source.

getPath()

getPath() : string
Inherited

inherited_from \Cactus\Task::getPath()

Returns

stringThe absolute path to the tasks directory.

Run the given list of seed classes.

multiple(array $list) : array

Parameters

$list

array

The list of classes

Returns

array[[$name => (boolean) success]]

Runs a single seed class.

single(string $name) : boolean

Parameters

$name

string

The name of the seed class to run

Exceptions

\Cactus\Exception

Returns

booleanSuccess

Return all of the files in the path directory.

getFiles(boolean $reverse) : array
Inherited

inherited_from \Cactus\Task::getFiles()

Parameters

$reverse

boolean

Find in reverse order?

Returns

arrayFile list

 Properties

 

The adapter used for the migrations

$adapter : \Cactus\Adapter
Inherited

inherited_from \Cactus\Task::$$adapter
 

Absolute path to the tasks folder

$path : string
Inherited

inherited_from \Cactus\Task::$$path