PHP Class Xethron\MigrationsGenerator\MigrateGenerateCommand

Inheritance: extends Way\Generators\Commands\GeneratorCommand
Afficher le fichier Open project: xethron/migrations-generator

Protected Properties

Свойство Type Description
$batch integer
$compiler Way\Generators\Compilers\TemplateCompiler
$config Illuminate\Config\Repository
$connection string | null
$datePrefix string Filename date prefix (Y_m_d_His)
$description string The console command description.
$fields array Array of Fields to create in a new Migration Namely: Columns, Indexes and Foreign Keys
$file Way\Generators\Filesystem\Filesystem
$log boolean
$method string
$migrationName string
$migrations array List of Migrations that has been done
$name string The console command name.
$repository Illuminate\Database\Migrations\MigrationRepositoryInterface
$schemaGenerator Xethron\MigrationsGenerator\Generators\SchemaGenerator
$table string

Méthodes publiques

Méthode Description
__construct ( Way\Generators\Generator $generator, Way\Generators\Filesystem\Filesystem $file, Way\Generators\Compilers\TemplateCompiler $compiler, Illuminate\Database\Migrations\MigrationRepositoryInterface $repository, Illuminate\Config\Repository $config )
fire ( ) : void Execute the console command.

Méthodes protégées

Méthode Description
askNumeric ( string $question, integer | float $default = null ) : integer | float Ask user for a Numeric Value, or blank for default
askYn ( string $question ) : boolean Ask for user input: Yes/No
generate ( string $method, array $tables ) : void Generate Migrations
getArguments ( ) : array Get the console command arguments.
getDatePrefix ( ) : string Get the date prefix for the migration.
getExcludedTables ( ) : array Get a list of tables to exclude
getFileGenerationPath ( ) : string The path where the file will be created
getOptions ( ) : array Get the console command options.
getTemplateData ( ) : array Fetch the template data
getTemplatePath ( ) : string Get path to template for generator
removeExcludedTables ( $tables ) : array Remove all the tables to exclude from the array of tables

Method Details

__construct() public méthode

public __construct ( Way\Generators\Generator $generator, Way\Generators\Filesystem\Filesystem $file, Way\Generators\Compilers\TemplateCompiler $compiler, Illuminate\Database\Migrations\MigrationRepositoryInterface $repository, Illuminate\Config\Repository $config )
$generator Way\Generators\Generator
$file Way\Generators\Filesystem\Filesystem
$compiler Way\Generators\Compilers\TemplateCompiler
$repository Illuminate\Database\Migrations\MigrationRepositoryInterface
$config Illuminate\Config\Repository

askNumeric() protected méthode

Ask user for a Numeric Value, or blank for default
protected askNumeric ( string $question, integer | float $default = null ) : integer | float
$question string Question to ask
$default integer | float Default Value (optional)
Résultat integer | float Answer

askYn() protected méthode

Ask for user input: Yes/No
protected askYn ( string $question ) : boolean
$question string Question to ask
Résultat boolean Answer from user

fire() public méthode

Execute the console command.
public fire ( ) : void
Résultat void

generate() protected méthode

Generate Migrations
protected generate ( string $method, array $tables ) : void
$method string Create Tables or Foreign Keys ['create', 'foreign_keys']
$tables array List of tables to create migrations for
Résultat void

getArguments() protected méthode

Get the console command arguments.
protected getArguments ( ) : array
Résultat array

getDatePrefix() protected méthode

Get the date prefix for the migration.
protected getDatePrefix ( ) : string
Résultat string

getExcludedTables() protected méthode

Get a list of tables to exclude
protected getExcludedTables ( ) : array
Résultat array

getFileGenerationPath() protected méthode

The path where the file will be created
protected getFileGenerationPath ( ) : string
Résultat string

getOptions() protected méthode

Get the console command options.
protected getOptions ( ) : array
Résultat array

getTemplateData() protected méthode

Fetch the template data
protected getTemplateData ( ) : array
Résultat array

getTemplatePath() protected méthode

Get path to template for generator
protected getTemplatePath ( ) : string
Résultat string

removeExcludedTables() protected méthode

Remove all the tables to exclude from the array of tables
protected removeExcludedTables ( $tables ) : array
$tables
Résultat array

Property Details

$batch protected_oe property

protected int $batch
Résultat integer

$compiler protected_oe property

protected TemplateCompiler,Way\Generators\Compilers $compiler
Résultat Way\Generators\Compilers\TemplateCompiler

$config protected_oe property

protected Repository,Illuminate\Config $config
Résultat Illuminate\Config\Repository

$connection protected_oe property

protected string|null $connection
Résultat string | null

$datePrefix protected_oe property

Filename date prefix (Y_m_d_His)
protected string $datePrefix
Résultat string

$description protected_oe property

The console command description.
protected string $description
Résultat string

$fields protected_oe property

Array of Fields to create in a new Migration Namely: Columns, Indexes and Foreign Keys
protected array $fields
Résultat array

$file protected_oe property

protected Filesystem,Way\Generators\Filesystem $file
Résultat Way\Generators\Filesystem\Filesystem

$log protected_oe property

protected bool $log
Résultat boolean

$method protected_oe property

protected string $method
Résultat string

$migrationName protected_oe property

protected string $migrationName
Résultat string

$migrations protected_oe property

List of Migrations that has been done
protected array $migrations
Résultat array

$name protected_oe property

The console command name.
protected string $name
Résultat string

$repository protected_oe property

protected MigrationRepositoryInterface,Illuminate\Database\Migrations $repository
Résultat Illuminate\Database\Migrations\MigrationRepositoryInterface

$schemaGenerator protected_oe property

protected SchemaGenerator,Xethron\MigrationsGenerator\Generators $schemaGenerator
Résultat Xethron\MigrationsGenerator\Generators\SchemaGenerator

$table protected_oe property

protected string $table
Résultat string