PHP Class PopulateShell, cakephp-db-migrations

This is a simple utility to populate the database with data for testing, demoing, and other purposes.
Inheritance: extends AppShell
Mostrar archivo Open project: joelmoss/cakephp-db-migrations

Public Properties

Property Type Description
$_user_defined True if user has passed any fixture names as arguments
$background
$data Array of fixture data to write into table
$dataSource Default datasource
$foreground
$helpers Population Helpers object
$options
$styles Console color styles
$tables Array of database tables

Public Methods

Method Description
_colorize ( $text = '', $style = null )
_formatColumn ( $name, $value )
_fromDb ( $model )
_loadModels ( ) Overides Shell::_loadModels, and builds the $uses array with Models.
_parsePhp ( $file )
_renameFixturesDir ( ) For legacy apps that have a config/fixtures directory, this will rename that to the new config/data directory.
_startFixture ( $name, $data )
_supportsColors ( )
create ( ) Alias for generate method
err ( $str )
g ( ) Alias for generate method
gen ( ) Alias for generate method
generate ( ) Generates a fixture file for each database table.
help ( ) Help method
initialize ( )
main ( )
out ( $string = '', $newline = true )
startup ( ) Starts up the the Shell and defines some basics
welcome ( )

Method Details

_colorize() public method

public _colorize ( $text = '', $style = null )

_formatColumn() public method

public _formatColumn ( $name, $value )

_fromDb() public method

public _fromDb ( $model )

_loadModels() public method

Overides Shell::_loadModels, and builds the $uses array with Models.
public _loadModels ( )

_parsePhp() public method

public _parsePhp ( $file )

_renameFixturesDir() public method

For legacy apps that have a config/fixtures directory, this will rename that to the new config/data directory.
public _renameFixturesDir ( )

_startFixture() public method

public _startFixture ( $name, $data )

_supportsColors() public method

public _supportsColors ( )

create() public method

Alias for generate method
public create ( )

err() public method

public err ( $str )

g() public method

Alias for generate method
public g ( )

gen() public method

Alias for generate method
public gen ( )

generate() public method

This has been taken from the generator shell which is now deprecated
public generate ( )

help() public method

Help method
public help ( )

initialize() public method

public initialize ( )

main() public method

public main ( )

out() public method

public out ( $string = '', $newline = true )

startup() public method

Starts up the the Shell and defines some basics
public startup ( )

welcome() public method

public welcome ( )

Property Details

$_user_defined public_oe property

True if user has passed any fixture names as arguments
public $_user_defined

$background public_oe property

public $background

$data public_oe property

Array of fixture data to write into table
public $data

$dataSource public_oe property

Default datasource
public $dataSource

$foreground public_oe property

public $foreground

$helpers public_oe property

Population Helpers object
public $helpers

$options public_oe property

public $options

$styles public_oe property

Console color styles
public $styles

$tables public_oe property

Array of database tables
public $tables