PHP Класс Appzcoder\CrudGenerator\Commands\CrudModelCommand

Наследование: extends Illuminate\Console\GeneratorCommand
Показать файл Открыть проект

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

Свойство Тип Описание
$description string The console command description.
$signature string The name and signature of the console command.
$type string The type of class being generated.

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

Метод Описание
buildClass ( string $name ) : string Build the model class with the given name.
createRelationshipFunction ( string &$stub, string $relationshipName, string $relationshipType, $argsString ) Create the code for a model relationship
getDefaultNamespace ( string $rootNamespace ) : string Get the default namespace for the class.
getStub ( ) : string Get the stub file for the generator.
replaceFillable ( string &$stub, string $fillable ) Replace the fillable for the given stub.
replacePrimaryKey ( string &$stub, string $primaryKey ) Replace the primary key for the given stub.
replaceRelationshipPlaceholder ( &$stub ) remove the relationships placeholder when it's no longer needed
replaceTable ( string &$stub, string $table ) Replace the table for the given stub.

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

buildClass() защищенный метод

Build the model class with the given name.
protected buildClass ( string $name ) : string
$name string
Результат string

createRelationshipFunction() защищенный метод

Create the code for a model relationship
protected createRelationshipFunction ( string &$stub, string $relationshipName, string $relationshipType, $argsString )
$stub string
$relationshipName string the name of the function, e.g. owners
$relationshipType string the type of the relationship, hasOne, hasMany, belongsTo etc

getDefaultNamespace() защищенный метод

Get the default namespace for the class.
protected getDefaultNamespace ( string $rootNamespace ) : string
$rootNamespace string
Результат string

getStub() защищенный метод

Get the stub file for the generator.
protected getStub ( ) : string
Результат string

replaceFillable() защищенный метод

Replace the fillable for the given stub.
protected replaceFillable ( string &$stub, string $fillable )
$stub string
$fillable string

replacePrimaryKey() защищенный метод

Replace the primary key for the given stub.
protected replacePrimaryKey ( string &$stub, string $primaryKey )
$stub string
$primaryKey string

replaceRelationshipPlaceholder() защищенный метод

remove the relationships placeholder when it's no longer needed
protected replaceRelationshipPlaceholder ( &$stub )
$stub

replaceTable() защищенный метод

Replace the table for the given stub.
protected replaceTable ( string &$stub, string $table )
$stub string
$table string

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

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

The console command description.
protected string $description
Результат string

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

The name and signature of the console command.
protected string $signature
Результат string

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

The type of class being generated.
protected string $type
Результат string