MigrationController
extends AbstractController
in package
Console database controller class
Tags
Table of Contents
Properties
- $application : Application|null
- Application object
- $bypassMaintenance : bool
- Bypass maintenance false
- $console : Console|null
- Console object
- $defaultAction : string
- Default action
- $maintenanceAction : string
- Maintenance action
Methods
- __construct() : mixed
- Constructor for the controller
- application() : Application
- Get application object
- bypassMaintenance() : bool
- Check the bypass maintenance check
- console() : Console
- Get request object
- create() : void
- Create command
- dispatch() : void
- Dispatch the controller based on the action
- error() : void
- Default error action method
- getDefaultAction() : string
- Get the default action
- getMaintenanceAction() : string
- Get the maintenance action
- point() : void
- Point command
- reset() : void
- Reset command
- rollback() : void
- Rollback command
- run() : void
- Run command
- setBypassMaintenance() : static
- Check the bypass maintenance check
- setDefaultAction() : AbstractController
- Set the default action
- setMaintenanceAction() : AbstractController
- Set the maintenance action
Properties
$application
Application object
protected
Application|null
$application
= null
$bypassMaintenance
Bypass maintenance false
protected
bool
$bypassMaintenance
= false
$console
Console object
protected
Console|null
$console
= null
$defaultAction
Default action
protected
string
$defaultAction
= 'error'
$maintenanceAction
Maintenance action
protected
string
$maintenanceAction
= 'maintenance'
Methods
__construct()
Constructor for the controller
public
__construct(Application $application, Console $console) : mixed
Parameters
- $application : Application
- $console : Console
application()
Get application object
public
application() : Application
Return values
ApplicationbypassMaintenance()
Check the bypass maintenance check
public
bypassMaintenance() : bool
Return values
boolconsole()
Get request object
public
console() : Console
Return values
Consolecreate()
Create command
public
create(string $class[, string|null $database = 'default' ]) : void
Parameters
- $class : string
- $database : string|null = 'default'
dispatch()
Dispatch the controller based on the action
public
dispatch([string|null $action = null ][, array<string|int, mixed>|null $params = null ]) : void
Parameters
- $action : string|null = null
- $params : array<string|int, mixed>|null = null
Tags
error()
Default error action method
public
error() : void
Tags
getDefaultAction()
Get the default action
public
getDefaultAction() : string
Return values
stringgetMaintenanceAction()
Get the maintenance action
public
getMaintenanceAction() : string
Return values
stringpoint()
Point command
public
point([mixed $id = 'latest' ][, string|null $database = 'default' ]) : void
Parameters
- $id : mixed = 'latest'
- $database : string|null = 'default'
reset()
Reset command
public
reset([string|null $database = 'default' ]) : void
Parameters
- $database : string|null = 'default'
rollback()
Rollback command
public
rollback([int|string|null $steps = 1 ][, string|null $database = 'default' ]) : void
Parameters
- $steps : int|string|null = 1
- $database : string|null = 'default'
run()
Run command
public
run([int|string|null $steps = 1 ][, string|null $database = 'default' ]) : void
Parameters
- $steps : int|string|null = 1
- $database : string|null = 'default'
setBypassMaintenance()
Check the bypass maintenance check
public
setBypassMaintenance([bool $bypass = true ]) : static
Parameters
- $bypass : bool = true
Return values
staticsetDefaultAction()
Set the default action
public
setDefaultAction(string $default) : AbstractController
Parameters
- $default : string
Return values
AbstractControllersetMaintenanceAction()
Set the maintenance action
public
setMaintenanceAction(string $maintenance) : AbstractController
Parameters
- $maintenance : string