PHP 클래스 Iber\Generator\Commands\MakeModelsCommand

상속: extends Illuminate\Console\GeneratorCommand
파일 보기 프로젝트 열기: ignasbernotas/laravel-model-generator

보호된 프로퍼티들

프로퍼티 타입 설명
$databaseEngine string
$description string The console command description.
$extends string Default class the model extends.
$fillableRules array Rules for columns that go into the fillable list.
$getFunctionStub string Contains the template stub for get function
$guardedRules array Rules for columns that go into the guarded list.
$name string The console command name.
$namespace string Default model namespace.
$ruleProcessor Rule processor class instance.
$setFunctionStub string Contains the template stub for set function
$timestampRules array Rules for columns that set whether the timestamps property is set to true/false.

공개 메소드들

메소드 설명
fire ( ) : mixed Execute the console command.
getStub ( ) : string Get stub file location.

보호된 메소드들

메소드 설명
generateTable ( $table ) : void Generate a model file from a database table.
getArguments ( ) : array Get the console command arguments.
getOptions ( ) : array Get the console command options.
getSchemaTables ( ) : array Get schema tables.
getTableColumns ( $table ) : array Get table columns.
getTablePrimaryKey ( $table ) : string Get table primary key column.
getTableProperties ( $table ) : array Fill up $fillable/$guarded/$timestamps properties based on table columns.
replaceTokens ( $name, $table ) : mixed | string Replace all stub tokens with properties.
replaceTokensWithSetGetFunctions ( array $properties, string $class ) : string Replaces setters and getters from the stub. The functions are created from provider properties.

메소드 상세

fire() 공개 메소드

Execute the console command.
public fire ( ) : mixed
리턴 mixed

generateTable() 보호된 메소드

Generate a model file from a database table.
protected generateTable ( $table ) : void
$table
리턴 void

getArguments() 보호된 메소드

Get the console command arguments.
protected getArguments ( ) : array
리턴 array

getOptions() 보호된 메소드

Get the console command options.
protected getOptions ( ) : array
리턴 array

getSchemaTables() 보호된 메소드

Get schema tables.
protected getSchemaTables ( ) : array
리턴 array

getStub() 공개 메소드

Get stub file location.
public getStub ( ) : string
리턴 string

getTableColumns() 보호된 메소드

Get table columns.
protected getTableColumns ( $table ) : array
$table
리턴 array

getTablePrimaryKey() 보호된 메소드

Get table primary key column.
protected getTablePrimaryKey ( $table ) : string
$table
리턴 string

getTableProperties() 보호된 메소드

Fill up $fillable/$guarded/$timestamps properties based on table columns.
protected getTableProperties ( $table ) : array
$table
리턴 array

replaceTokens() 보호된 메소드

Replace all stub tokens with properties.
protected replaceTokens ( $name, $table ) : mixed | string
$name
$table
리턴 mixed | string

replaceTokensWithSetGetFunctions() 보호된 메소드

Replaces setters and getters from the stub. The functions are created from provider properties.
protected replaceTokensWithSetGetFunctions ( array $properties, string $class ) : string
$properties array
$class string
리턴 string

프로퍼티 상세

$databaseEngine 보호되어 있는 프로퍼티

protected string $databaseEngine
리턴 string

$description 보호되어 있는 프로퍼티

The console command description.
protected string $description
리턴 string

$extends 보호되어 있는 프로퍼티

Default class the model extends.
protected string $extends
리턴 string

$fillableRules 보호되어 있는 프로퍼티

Rules for columns that go into the fillable list.
protected array $fillableRules
리턴 array

$getFunctionStub 보호되어 있는 프로퍼티

Contains the template stub for get function
protected string $getFunctionStub
리턴 string

$guardedRules 보호되어 있는 프로퍼티

Rules for columns that go into the guarded list.
protected array $guardedRules
리턴 array

$name 보호되어 있는 프로퍼티

The console command name.
protected string $name
리턴 string

$namespace 보호되어 있는 프로퍼티

Default model namespace.
protected string $namespace
리턴 string

$ruleProcessor 보호되어 있는 프로퍼티

Rule processor class instance.
protected $ruleProcessor

$setFunctionStub 보호되어 있는 프로퍼티

Contains the template stub for set function
protected string $setFunctionStub
리턴 string

$timestampRules 보호되어 있는 프로퍼티

Rules for columns that set whether the timestamps property is set to true/false.
protected array $timestampRules
리턴 array