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
Afficher le fichier Open project: joelmoss/cakephp-db-migrations

Méthodes publiques

Свойство 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

Méthodes publiques

Méthode 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 méthode

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

_formatColumn() public méthode

public _formatColumn ( $name, $value )

_fromDb() public méthode

public _fromDb ( $model )

_loadModels() public méthode

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

_parsePhp() public méthode

public _parsePhp ( $file )

_renameFixturesDir() public méthode

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

_startFixture() public méthode

public _startFixture ( $name, $data )

_supportsColors() public méthode

public _supportsColors ( )

create() public méthode

Alias for generate method
public create ( )

err() public méthode

public err ( $str )

g() public méthode

Alias for generate method
public g ( )

gen() public méthode

Alias for generate method
public gen ( )

generate() public méthode

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

help() public méthode

Help method
public help ( )

initialize() public méthode

public initialize ( )

main() public méthode

public main ( )

out() public méthode

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

startup() public méthode

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

welcome() public méthode

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