PHP Class Appzcoder\CrudGenerator\Commands\CrudControllerCommand

Inheritance: extends Illuminate\Console\GeneratorCommand
Mostrar archivo Open project: appzcoder/crud-generator

Protected Properties

Property Type Description
$description string The console command description.
$signature string The name and signature of the console command.
$type string The type of class being generated.

Protected Methods

Method Description
buildClass ( string $name ) : string Build the model class with the given name.
getDefaultNamespace ( string $rootNamespace ) : string Get the default namespace for the class.
getStub ( ) : string Get the stub file for the generator.
replaceCrudName ( string &$stub, string $crudName ) Replace the crudName for the given stub.
replaceCrudNameSingular ( string &$stub, string $crudNameSingular ) Replace the crudNameSingular for the given stub.
replaceFileSnippet ( &$stub, $fileSnippet ) Replace the file snippet for the given stub
replaceModelName ( string &$stub, string $modelName ) Replace the modelName for the given stub.
replaceModelNamespace ( string &$stub, $modelNamespace ) Replace the modelName for the given stub.
replacePaginationNumber ( &$stub, $perPage ) Replace the pagination placeholder for the given stub
replaceRouteGroup ( string &$stub, string $routeGroup ) Replace the routeGroup for the given stub.
replaceValidationRules ( string &$stub, string $validationRules ) Replace the validationRules for the given stub.
replaceViewName ( string &$stub, string $viewName ) Replace the viewName fo the given stub.
replaceViewPath ( string &$stub, string $viewPath ) Replace the viewPath for the given stub.

Method Details

buildClass() protected method

Build the model class with the given name.
protected buildClass ( string $name ) : string
$name string
return string

getDefaultNamespace() protected method

Get the default namespace for the class.
protected getDefaultNamespace ( string $rootNamespace ) : string
$rootNamespace string
return string

getStub() protected method

Get the stub file for the generator.
protected getStub ( ) : string
return string

replaceCrudName() protected method

Replace the crudName for the given stub.
protected replaceCrudName ( string &$stub, string $crudName )
$stub string
$crudName string

replaceCrudNameSingular() protected method

Replace the crudNameSingular for the given stub.
protected replaceCrudNameSingular ( string &$stub, string $crudNameSingular )
$stub string
$crudNameSingular string

replaceFileSnippet() protected method

Replace the file snippet for the given stub
protected replaceFileSnippet ( &$stub, $fileSnippet )
$stub
$fileSnippet

replaceModelName() protected method

Replace the modelName for the given stub.
protected replaceModelName ( string &$stub, string $modelName )
$stub string
$modelName string

replaceModelNamespace() protected method

Replace the modelName for the given stub.
protected replaceModelNamespace ( string &$stub, $modelNamespace )
$stub string

replacePaginationNumber() protected method

Replace the pagination placeholder for the given stub
protected replacePaginationNumber ( &$stub, $perPage )
$stub
$perPage

replaceRouteGroup() protected method

Replace the routeGroup for the given stub.
protected replaceRouteGroup ( string &$stub, string $routeGroup )
$stub string
$routeGroup string

replaceValidationRules() protected method

Replace the validationRules for the given stub.
protected replaceValidationRules ( string &$stub, string $validationRules )
$stub string
$validationRules string

replaceViewName() protected method

Replace the viewName fo the given stub.
protected replaceViewName ( string &$stub, string $viewName )
$stub string
$viewName string

replaceViewPath() protected method

Replace the viewPath for the given stub.
protected replaceViewPath ( string &$stub, string $viewPath )
$stub string
$viewPath string

Property Details

$description protected_oe property

The console command description.
protected string $description
return string

$signature protected_oe property

The name and signature of the console command.
protected string $signature
return string

$type protected_oe property

The type of class being generated.
protected string $type
return string