Seeder
Seeder Class.
Finds all seeds class across sprinkles
Tags
Table of Contents
$ci | ContainerInterface | |
---|---|---|
$scheme | string | |
__construct() | Class Constructor. | mixed |
getSeeds() | Loop all the available sprinkles and return a list of their seeds. | array |
getSeed() | Get a single seed info. | array |
getSeedClass() | Return the class instance of a seed. | SeedInterface |
executeSeed() | Execute a seed class. | mixed |
execute() | Execute a seed based on it's name. | mixed |
loadSeeders() | Process seeder Resource into info. | array |
getSeedDetails() | Return an array of seed details inclusing the classname and the sprinkle name. | array |
Properties
$ci
protected
ContainerInterface
$ci
$scheme
protected
string
$scheme
= 'seeds://'
Methods
__construct()
Class Constructor.
public
__construct(
$ci :
ContainerInterface
)
: mixed
Parameters
- $ci : ContainerInterface
Return values
mixedgetSeeds()
Loop all the available sprinkles and return a list of their seeds.
public
getSeeds(
)
: array
Return values
array —An array of all the seed classes found for every sprinkle
getSeed()
Get a single seed info.
public
getSeed(
$name :
string
)
: array
Parameters
- $name : string
The seed name
Tags
Return values
array —The details about a seed file [name, class, sprinkle]
getSeedClass()
Return the class instance of a seed.
public
getSeedClass(
$name :
string
)
: SeedInterface
Parameters
- $name : string
The seed name
Tags
Return values
SeedInterface —The seed class instance
executeSeed()
Execute a seed class.
public
executeSeed(
$seed :
SeedInterface
)
: mixed
Parameters
- $seed : SeedInterface
The seed to execute
Return values
mixedexecute()
Execute a seed based on it's name.
public
execute(
$seedName :
string
)
: mixed
Parameters
- $seedName : string
Return values
mixedloadSeeders()
Process seeder Resource into info.
protected
loadSeeders(
$seedFiles :
array
)
: array
Parameters
- $seedFiles : array
List of seeds file
Return values
arraygetSeedDetails()
Return an array of seed details inclusing the classname and the sprinkle name.
protected
getSeedDetails(
$file :
Resource
)
: array
Parameters
- $file : Resource
The seed file
Return values
array —The details about a seed file [name, class, sprinkle]