Class DbConfigTask
Task class for creating and updating the database configuration file.
- AppShell
 -  
 DbConfigTask  
 Package: Cake\Console\Command\Task
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Console/Command/Task/DbConfigTask.php
 
  Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Console/Command/Task/DbConfigTask.php
Properties summary
-  
$_defaultConfigprotectedDefault configuration settings to usearray -  
$databaseClassNamepublicstringString name of the database config class name. Used for testing.
 -  
$pathpublicpath to CONFIG directorystring 
Method Summary
-  _interactive() protectedInteractive interface
 -  _verify() protectedOutput verification message and bake if it looks good
 -  bake() publicAssembles and writes database.php
 -  execute() publicExecution method always used for tasks
 -  getConfig() publicGet a user specified Connection name
 -  getOptionParser() publicGets the option parser instance and configures it.
 -  initialize() publicinitialization callback
 
Method Detail
_verify()source protected
_verify( array $config )
Output verification message and bake if it looks good
Parameters
-  array 
$config - The config data.
 
Returns
booleanTrue if user says it looks good, false otherwise
bake()source public
bake( array $configs )
Assembles and writes database.php
Parameters
-  array 
$configs - Configuration settings to use
 
Returns
booleanSuccess
getOptionParser()source public
getOptionParser( )
Gets the option parser instance and configures it.
Returns
ConsoleOptionParserProperties detail
$_defaultConfigsource
protected array
Default configuration settings to use
array(
    'name' => 'default',
    'datasource' => 'Database/Mysql',
    'persistent' => 'false',
    'host' => 'localhost',
    'login' => 'root',
    'password' => 'password',
    'database' => 'project_name',
    'schema' => null,
    'prefix' => null,
    'encoding' => null,
    'port' => null
) $databaseClassNamesource
public string
String name of the database config class name. Used for testing.
'DATABASE_CONFIG'
    © 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
    https://api.cakephp.org/2.9/class-DbConfigTask.html