class Breakpoint extends AbstractCommand

数据库迁移-断点

Constants

DEFAULT_MIGRATION_TEMPLATE

The location of the default migration template.

DEFAULT_SEED_TEMPLATE

The location of the default seed template.

Properties

protected Console $console Console实例 from Command
protected Config $config from AbstractCommand
protected AdapterInterface $adapter from AbstractCommand
protected Manager $manager from AbstractCommand
protected $description
protected $arguments
protected $options
protected $help

Methods

__construct(Console $console)

Command constructor.

from Command
execute(array $args, array $options = [])

Toggle the breakpoint.

string
format(string $text, array $option = [])

格式化文本

from Command
$this
write(string $text, array $option = [])

格式化输出

from Command
$this
writeln(string $text, array $option = [])

格式化输出

from Command
bootstrap(array $args, array $options = [])

Bootstrap Phinx.

setConfig(Config $config)

Sets the config.

Config
getConfig()

Gets the config.

setAdapter(AdapterInterface $adapter)

Sets the database adapter.

AdapterInterface
getAdapter()

Gets the database adapter.

setManager(Manager $manager)

Sets the migration manager.

Manager
getManager()

Gets the migration manager.

void
loadConfig(array $options)

Parse the config file and load it into the config object

loadManager(array $args, array $options)

Load the migrations manager and inject the config

void
verifyMigrationDirectory(string $path)

Verify that the migration directory exists and is writable.

void
verifySeedDirectory(string $path)

Verify that the seed directory exists and is writable.

string
getMigrationTemplateFilename()

Returns the migration template filename.

string
getSeedTemplateFilename()

Returns the seed template filename.

Details

in Command at line 35
__construct(Console $console)

Command constructor.

Parameters

Console $console

at line 48
execute(array $args, array $options = [])

Toggle the breakpoint.

Parameters

array $args 传递给命令的参数
array $options 传递给命令的选项

in Command at line 56
string format(string $text, array $option = [])

格式化文本

Parameters

string $text 要格式化的文本
array $option 格式化选项 see Format

Return Value

string

in Command at line 70
$this write(string $text, array $option = [])

格式化输出

Parameters

string $text 要输出的内容
array $option 格式化选项 see Format

Return Value

$this

in Command at line 84
$this writeln(string $text, array $option = [])

格式化输出

Parameters

string $text 要输出的内容
array $option 格式化选项 see Format

Return Value

$this

in AbstractCommand at line 60
bootstrap(array $args, array $options = [])

Bootstrap Phinx.

Parameters

array $args
array $options

in AbstractCommand at line 108
AbstractCommand setConfig(Config $config)

Sets the config.

Parameters

Config $config

Return Value

AbstractCommand

in AbstractCommand at line 119
Config getConfig()

Gets the config.

Return Value

Config

in AbstractCommand at line 130
AbstractCommand setAdapter(AdapterInterface $adapter)

Sets the database adapter.

Parameters

AdapterInterface $adapter

Return Value

AbstractCommand

in AbstractCommand at line 141
AdapterInterface getAdapter()

Gets the database adapter.

Return Value

AdapterInterface

in AbstractCommand at line 152
AbstractCommand setManager(Manager $manager)

Sets the migration manager.

Parameters

Manager $manager

Return Value

AbstractCommand

in AbstractCommand at line 163
Manager getManager()

Gets the migration manager.

Return Value

Manager

in AbstractCommand at line 177
protected void loadConfig(array $options)

Parse the config file and load it into the config object

Parameters

array $options 选项

Return Value

void

Exceptions

InvalidArgumentException

in AbstractCommand at line 196
protected loadManager(array $args, array $options)

Load the migrations manager and inject the config

Parameters

array $args
array $options

in AbstractCommand at line 212
protected void verifyMigrationDirectory(string $path)

Verify that the migration directory exists and is writable.

Parameters

string $path

Return Value

void

Exceptions

InvalidArgumentException

in AbstractCommand at line 237
protected void verifySeedDirectory(string $path)

Verify that the seed directory exists and is writable.

Parameters

string $path

Return Value

void

Exceptions

InvalidArgumentException

in AbstractCommand at line 259
protected string getMigrationTemplateFilename()

Returns the migration template filename.

Return Value

string

in AbstractCommand at line 269
protected string getSeedTemplateFilename()

Returns the seed template filename.

Return Value

string