PHP Класс PopulateShell, cakephp-db-migrations

This is a simple utility to populate the database with data for testing, demoing, and other purposes.
Наследование: extends AppShell
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
_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 ( )

Описание методов

_colorize() публичный Метод

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

_formatColumn() публичный Метод

public _formatColumn ( $name, $value )

_fromDb() публичный Метод

public _fromDb ( $model )

_loadModels() публичный Метод

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

_parsePhp() публичный Метод

public _parsePhp ( $file )

_renameFixturesDir() публичный Метод

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

_startFixture() публичный Метод

public _startFixture ( $name, $data )

_supportsColors() публичный Метод

public _supportsColors ( )

create() публичный Метод

Alias for generate method
public create ( )

err() публичный Метод

public err ( $str )

g() публичный Метод

Alias for generate method
public g ( )

gen() публичный Метод

Alias for generate method
public gen ( )

generate() публичный Метод

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

help() публичный Метод

Help method
public help ( )

initialize() публичный Метод

public initialize ( )

main() публичный Метод

public main ( )

out() публичный Метод

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

startup() публичный Метод

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

welcome() публичный Метод

public welcome ( )

Описание свойств

$_user_defined публичное свойство

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

$background публичное свойство

public $background

$data публичное свойство

Array of fixture data to write into table
public $data

$dataSource публичное свойство

Default datasource
public $dataSource

$foreground публичное свойство

public $foreground

$helpers публичное свойство

Population Helpers object
public $helpers

$options публичное свойство

public $options

$styles публичное свойство

Console color styles
public $styles

$tables публичное свойство

Array of database tables
public $tables