Class BakeShell

Command-line code generation utility to automate programmer chores.

Bake is CakePHP's code generation script, which can help you kickstart application development by writing fully functional skeleton controllers, models, and views. Going further, Bake can also write Unit Tests for you.

AppShell
Extended by BakeShell
Package: Cake\Console\Command
Link: https://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/Console/Command/BakeShell.php

Properties summary

  • $connection public
    string
    The connection being used.
  • $tasks public
    array
    Contains tasks to load and instantiate

Method Summary

  • all() public
    Quickly bake the MVC
  • Gets the option parser instance and configures it.
  • main() public
    Override main() to handle action
  • startup() public
    Assign $this->connection to the active task if a connection param is set.

Method Detail

all()source public

all( )

Quickly bake the MVC

getOptionParser()source public

getOptionParser( )

Gets the option parser instance and configures it.

Returns

ConsoleOptionParser

main()source public

main( )

Override main() to handle action

Returns

mixed

startup()source public

startup( )

Assign $this->connection to the active task if a connection param is set.

Properties detail

$connectionsource

public string

The connection being used.

'default'

$taskssource

public array

Contains tasks to load and instantiate

array('Project', 'DbConfig', 'Model', 'Controller', 'View', 'Plugin', 'Fixture', 'Test')

© 2005–2017 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.10/class-BakeShell.html