PHP 클래스 Orangehill\Iseed\Iseed

파일 보기 프로젝트 열기: orangehill/iseed 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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