DatabaseController
extends AbstractController
in package
Console database controller class
Tags
Table of Contents
- $application : Application
- Application object
- $console : Console
- Console object
- $defaultAction : string
- Default action
- __construct() : mixed
- Constructor for the controller
- application() : Application
- Get application object
- clear() : void
- Clear command
- config() : void
- Config command
- console() : Console
- Get request object
- createSeed() : void
- Create seed command
- dispatch() : void
- Dispatch the controller based on the action
- error() : void
- Default error action method
- getDefaultAction() : string
- Get the default action
- install() : void
- Install command
- reset() : void
- Reset command
- seed() : void
- Seed command
- setDefaultAction() : AbstractController
- Set the default action
- test() : void
- Test command
Properties
$application
Application object
protected
Application
$application
= null
$console
Console object
protected
Console
$console
= null
$defaultAction
Default action
protected
string
$defaultAction
= 'error'
Methods
__construct()
Constructor for the controller
public
__construct(Application $application, Console $console) : mixed
Parameters
- $application : Application
- $console : Console
Return values
mixed —application()
Get application object
public
application() : Application
Return values
Application —clear()
Clear command
public
clear([string $database = 'default' ]) : void
Parameters
- $database : string = 'default'
Return values
void —config()
Config command
public
config([string $database = 'default' ]) : void
Parameters
- $database : string = 'default'
Return values
void —console()
Get request object
public
console() : Console
Return values
Console —createSeed()
Create seed command
public
createSeed(string $class[, string $database = 'default' ]) : void
Parameters
- $class : string
- $database : string = 'default'
Return values
void —dispatch()
Dispatch the controller based on the action
public
dispatch([string $action = null ][, array<string|int, mixed> $params = null ]) : void
Parameters
- $action : string = null
- $params : array<string|int, mixed> = null
Tags
Return values
void —error()
Default error action method
public
error() : void
Tags
Return values
void —getDefaultAction()
Get the default action
public
getDefaultAction() : string
Return values
string —install()
Install command
public
install([string $database = 'default' ]) : void
Parameters
- $database : string = 'default'
Return values
void —reset()
Reset command
public
reset([string $database = 'default' ]) : void
Parameters
- $database : string = 'default'
Return values
void —seed()
Seed command
public
seed([string $database = 'default' ]) : void
Parameters
- $database : string = 'default'
Return values
void —setDefaultAction()
Set the default action
public
setDefaultAction(string $default) : AbstractController
Parameters
- $default : string
Return values
AbstractController —test()
Test command
public
test([string $database = 'default' ]) : void
Parameters
- $database : string = 'default'