Seed
extends Command
in package
Uses
DatabaseConnection
Table of Contents
- $bufferedStatements : string
- configure() : void
- execute() : int
- executeBufferedStatements() : mixed
- executePHPStatements() : mixed
- executeSQLStatements() : mixed
- filterSeedFiles() : array<string|int, mixed>
- Seed filtering always starts with all files.
- importFile() : mixed
- matchesAnySelector() : bool
- matchesSelector() : bool
- resetDatabase() : mixed
- setDatabaseConnection() : mixed
Properties
$bufferedStatements
private
string
$bufferedStatements
= ""
Methods
configure()
protected
configure() : void
Return values
void —execute()
protected
execute(InputInterface $in, OutputInterface $out) : int
Parameters
- $in : InputInterface
- $out : OutputInterface
Return values
int —executeBufferedStatements()
private
executeBufferedStatements(OutputInterface $out) : mixed
Parameters
- $out : OutputInterface
Return values
mixed —executePHPStatements()
private
executePHPStatements(mixed $filePath) : mixed
Parameters
- $filePath : mixed
Return values
mixed —executeSQLStatements()
private
executeSQLStatements(mixed $filepath) : mixed
Parameters
- $filepath : mixed
Return values
mixed —filterSeedFiles()
Seed filtering always starts with all files.
private
filterSeedFiles(array<string|int, mixed> $seedFiles, string $seedRoot, array<string|int, mixed> $excludedPaths, array<string|int, mixed> $includedPaths) : array<string|int, mixed>
Step 1: remove matching excluded paths. Step 2: add matching included paths back in.
Parameters
- $seedFiles : array<string|int, mixed>
- $seedRoot : string
- $excludedPaths : array<string|int, mixed>
- $includedPaths : array<string|int, mixed>
Return values
array<string|int, mixed> —importFile()
private
importFile(mixed $filePath, OutputInterface $out) : mixed
Parameters
- $filePath : mixed
- $out : OutputInterface
Return values
mixed —matchesAnySelector()
private
matchesAnySelector(string $seedFile, array<string|int, mixed> $selectors, string $seedRoot) : bool
Parameters
- $seedFile : string
- $selectors : array<string|int, mixed>
- $seedRoot : string
Return values
bool —matchesSelector()
private
matchesSelector(string $seedFile, string $selector, string $seedRoot) : bool
Parameters
- $seedFile : string
- $selector : string
- $seedRoot : string
Return values
bool —resetDatabase()
private
resetDatabase(OutputInterface $out) : mixed
Parameters
- $out : OutputInterface
Return values
mixed —setDatabaseConnection()
private
setDatabaseConnection() : mixed