PHP Class Migrations\View\Helper\MigrationHelper

MigrationHelper encloses all methods needed while working with HTML pages.
Inheritance: extends Cake\View\Helper
Datei anzeigen Open project: cakephp/migrations

Public Properties

Property Type Description
$returnedData
$tableStatements array It helps prevent duplicate calls in case of complex conditions

Protected Properties

Property Type Description
$schemas array Schemas list for tables analyzed during migration baking

Public Methods

Method Description
__construct ( Cake\View\View $View, array $config = [] ) Constructor
attributes ( string $table, string $column ) : array Returns an array of attributes for a given table column
column ( Cake\Database\Schema\Table $tableSchema, string $column ) : array Returns an array of column data for a single column
columnMethod ( string $action ) : string Returns the method to be used for the column manipulation
columns ( string $table ) : array Returns an array of column data for a given table
constraints ( string $table ) : array Returns an array of constraints for a given table
getColumnOption ( $options )
hasUnsignedPrimaryKey ( array $tables ) : boolean Returns whether the $tables list given as arguments contains primary keys unsigned.
indexMethod ( string $action ) : string Returns the method to be used for the index manipulation
indexes ( string $table ) : array Returns an array of indexes for a given table
primaryKeys ( string $table ) : array Returns the primary key data for a given table
primaryKeysColumnsList ( string $table ) : array Returns the primary key columns name for a given table
stringifyList ( array $list, array $options = [] ) : string Returns an array converted into a formatted multiline string
tableMethod ( string $action ) : string Returns the method to be used for the Table::save()
tableStatement ( string $table, boolean $reset = false ) : string Returns a $this->table() statement only if it was not issued already
value ( string $value, $numbersAsString = false ) : mixed Returns a string-like representation of a value

Protected Methods

Method Description
schema ( string $table ) : Cake\Database\Schema\Table Returns the Cake\Database\Schema\Table for $table

Method Details

__construct() public method

### Settings - collection \Cake\Database\Schema\Collection
public __construct ( Cake\View\View $View, array $config = [] )
$View Cake\View\View The View this helper is being attached to.
$config array Configuration settings for the helper.

attributes() public method

Returns an array of attributes for a given table column
public attributes ( string $table, string $column ) : array
$table string Name of the table to retrieve columns for
$column string A column to retrieve attributes for
return array

column() public method

Returns an array of column data for a single column
public column ( Cake\Database\Schema\Table $tableSchema, string $column ) : array
$tableSchema Cake\Database\Schema\Table Name of the table to retrieve columns for
$column string A column to retrieve data for
return array

columnMethod() public method

Returns the method to be used for the column manipulation
public columnMethod ( string $action ) : string
$action string Name of action to take against the table
return string

columns() public method

Returns an array of column data for a given table
public columns ( string $table ) : array
$table string Name of the table to retrieve columns for
return array

constraints() public method

Returns an array of constraints for a given table
public constraints ( string $table ) : array
$table string Name of the table to retrieve constraints for
return array

getColumnOption() public method

public getColumnOption ( $options )

hasUnsignedPrimaryKey() public method

Returns whether the $tables list given as arguments contains primary keys unsigned.
public hasUnsignedPrimaryKey ( array $tables ) : boolean
$tables array List of tables to check
return boolean

indexMethod() public method

Returns the method to be used for the index manipulation
public indexMethod ( string $action ) : string
$action string Name of action to take against the table
return string

indexes() public method

Returns an array of indexes for a given table
public indexes ( string $table ) : array
$table string Name of the table to retrieve indexes for
return array

primaryKeys() public method

Returns the primary key data for a given table
public primaryKeys ( string $table ) : array
$table string Name of the table ot retrieve primary key for
return array

primaryKeysColumnsList() public method

Returns the primary key columns name for a given table
public primaryKeysColumnsList ( string $table ) : array
$table string Name of the table ot retrieve primary key for
return array

schema() protected method

Returns the Cake\Database\Schema\Table for $table
protected schema ( string $table ) : Cake\Database\Schema\Table
$table string Name of the table to get the Schema for
return Cake\Database\Schema\Table

stringifyList() public method

Returns an array converted into a formatted multiline string
public stringifyList ( array $list, array $options = [] ) : string
$list array array of items to be stringified
$options array options to use
return string

tableMethod() public method

Returns the method to be used for the Table::save()
public tableMethod ( string $action ) : string
$action string Name of action to take against the table
return string

tableStatement() public method

Returns a $this->table() statement only if it was not issued already
public tableStatement ( string $table, boolean $reset = false ) : string
$table string Table for which the statement is needed
$reset boolean
return string

value() public method

Returns a string-like representation of a value
public value ( string $value, $numbersAsString = false ) : mixed
$value string A value to represent as a string
return mixed

Property Details

$returnedData public_oe property

public $returnedData

$schemas protected_oe property

Schemas list for tables analyzed during migration baking
protected array $schemas
return array

$tableStatements public_oe property

It helps prevent duplicate calls in case of complex conditions
public array $tableStatements
return array