PHP Class Migrations\View\Helper\MigrationHelper

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

Méthodes publiques

Свойство Type Description
$returnedData
$tableStatements array It helps prevent duplicate calls in case of complex conditions

Protected Properties

Свойство Type Description
$schemas array Schemas list for tables analyzed during migration baking

Méthodes publiques

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

Méthodes protégées

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

Method Details

__construct() public méthode

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

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
Résultat array

column() public méthode

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
Résultat array

columnMethod() public méthode

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
Résultat string

columns() public méthode

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
Résultat array

constraints() public méthode

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

getColumnOption() public méthode

public getColumnOption ( $options )

hasUnsignedPrimaryKey() public méthode

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

indexMethod() public méthode

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
Résultat string

indexes() public méthode

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

primaryKeys() public méthode

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
Résultat array

primaryKeysColumnsList() public méthode

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
Résultat array

schema() protected méthode

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
Résultat Cake\Database\Schema\Table

stringifyList() public méthode

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
Résultat string

tableMethod() public méthode

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
Résultat string

tableStatement() public méthode

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
Résultat string

value() public méthode

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

Property Details

$returnedData public_oe property

public $returnedData

$schemas protected_oe property

Schemas list for tables analyzed during migration baking
protected array $schemas
Résultat array

$tableStatements public_oe property

It helps prevent duplicate calls in case of complex conditions
public array $tableStatements
Résultat array