PHP Класс Orangehill\Iseed\Iseed

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$databaseName string Name of the database upon which the seed will be executed.

Открытые методы

Метод Описание
__construct ( Illuminate\Filesystem\Filesystem $filesystem = null )
cleanSection ( ) : boolean Cleans the iSeed section
generateClassName ( string $table ) : string Generates a seed class name (also used as a filename)
generateSeed ( string $table, string $database = null, integer $max, string $prerunEvent = null, $postrunEvent = null ) : boolean Generates a seed file.
getData ( string $table, $max ) : Array Get the Data
getPath ( string $name, string $path ) : string Create the full path name to the seed file.
getSeedPath ( ) : string Get a seed folder path
getStubPath ( ) : string Get the path to the stub file.
hasTable ( string $table ) : boolean Checks if a database table exists
populateStub ( string $class, string $stub, string $table, string $data, integer $chunkSize = null, string $prerunEvent = null, $postrunEvent = null ) : string Populate the place-holders in the seed stub.
repackSeedData ( array | object $data ) : array Repacks data read from the database
updateDatabaseSeederRunMethod ( string $className ) : boolean Updates the DatabaseSeeder file's run method (kudoz to: https://github.com/JeffreyWay/Laravel-4-Generators)

Защищенные методы

Метод Описание
prettifyArray ( array $array ) : string Prettify a var_export of an array

Приватные методы

Метод Описание
addIndent ( string &$content, integer $numberOfIndents = 1 ) Adds indentation to the passed content reference.
addNewLines ( string &$content, integer $numberOfLines = 1 ) Adds new lines to the passed content variable reference.

Описание методов

__construct() публичный Метод

public __construct ( Illuminate\Filesystem\Filesystem $filesystem = null )
$filesystem Illuminate\Filesystem\Filesystem

cleanSection() публичный Метод

Cleans the iSeed section
public cleanSection ( ) : boolean
Результат boolean

generateClassName() публичный Метод

Generates a seed class name (also used as a filename)
public generateClassName ( string $table ) : string
$table string
Результат string

generateSeed() публичный Метод

Generates a seed file.
public generateSeed ( string $table, string $database = null, integer $max, string $prerunEvent = null, $postrunEvent = null ) : boolean
$table string
$database string
$max integer
$prerunEvent string
Результат boolean

getData() публичный Метод

Get the Data
public getData ( string $table, $max ) : Array
$table string
Результат Array

getPath() публичный Метод

Create the full path name to the seed file.
public getPath ( string $name, string $path ) : string
$name string
$path string
Результат string

getSeedPath() публичный Метод

Get a seed folder path
public getSeedPath ( ) : string
Результат string

getStubPath() публичный Метод

Get the path to the stub file.
public getStubPath ( ) : string
Результат string

hasTable() публичный Метод

Checks if a database table exists
public hasTable ( string $table ) : boolean
$table string
Результат boolean

populateStub() публичный Метод

Populate the place-holders in the seed stub.
public populateStub ( string $class, string $stub, string $table, string $data, integer $chunkSize = null, string $prerunEvent = null, $postrunEvent = null ) : string
$class string
$stub string
$table string
$data string
$chunkSize integer
$prerunEvent string
Результат string

prettifyArray() защищенный Метод

Prettify a var_export of an array
protected prettifyArray ( array $array ) : string
$array array
Результат string

repackSeedData() публичный Метод

Repacks data read from the database
public repackSeedData ( array | object $data ) : array
$data array | object
Результат array

updateDatabaseSeederRunMethod() публичный Метод

Updates the DatabaseSeeder file's run method (kudoz to: https://github.com/JeffreyWay/Laravel-4-Generators)
public updateDatabaseSeederRunMethod ( string $className ) : boolean
$className string
Результат boolean

Описание свойств

$databaseName защищенное свойство

Name of the database upon which the seed will be executed.
protected string $databaseName
Результат string