PHP Class Baum\Console\InstallCommand

Inheritance: extends Illuminate\Console\Command
Exibir arquivo Open project: gazsp/baum

Protected Properties

Property Type Description
$description string The console command description.
$migrator Baum\Generators\MigrationGenerator Migration generator instance.
$modeler Baum\Generators\ModelGenerator Model generator instance.
$name string The console command name.

Public Methods

Method Description
__construct ( MigrationGenerator $migrator, ModelGenerator $modeler ) : void Create a new command instance.
fire ( ) : void Execute the console command.

Protected Methods

Method Description
getArguments ( ) : array Get the command arguments.
getMigrationsPath ( ) : string Get the path to the migrations directory.
getModelsPath ( ) : string Get the path to the models directory.
writeMigration ( string $name ) : string Write the migration file to disk.
writeModel ( string $name ) : string Write the model file to disk.

Method Details

__construct() public method

Create a new command instance.
public __construct ( MigrationGenerator $migrator, ModelGenerator $modeler ) : void
$migrator Baum\Generators\MigrationGenerator
$modeler Baum\Generators\ModelGenerator
return void

fire() public method

Basically, we'll write the migration and model stubs out to disk inflected with the name provided. Once its done, we'll dump-autoload for the entire framework to make sure that the new classes are registered by the class loaders.
public fire ( ) : void
return void

getArguments() protected method

Get the command arguments.
protected getArguments ( ) : array
return array

getMigrationsPath() protected method

Get the path to the migrations directory.
protected getMigrationsPath ( ) : string
return string

getModelsPath() protected method

Get the path to the models directory.
protected getModelsPath ( ) : string
return string

writeMigration() protected method

Write the migration file to disk.
protected writeMigration ( string $name ) : string
$name string
return string

writeModel() protected method

Write the model file to disk.
protected writeModel ( string $name ) : string
$name string
return string

Property Details

$description protected_oe property

The console command description.
protected string $description
return string

$migrator protected_oe property

Migration generator instance.
protected MigrationGenerator,Baum\Generators $migrator
return Baum\Generators\MigrationGenerator

$modeler protected_oe property

Model generator instance.
protected ModelGenerator,Baum\Generators $modeler
return Baum\Generators\ModelGenerator

$name protected_oe property

The console command name.
protected string $name
return string