PHP Класс Migrations\View\Helper\MigrationHelper

MigrationHelper encloses all methods needed while working with HTML pages.
Наследование: extends Cake\View\Helper
Показать файл Открыть проект

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

Свойство Тип Описание
$returnedData
$tableStatements array It helps prevent duplicate calls in case of complex conditions

Защищенные свойства (Protected)

Свойство Тип Описание
$schemas array Schemas list for tables analyzed during migration baking

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

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

Защищенные методы

Метод Описание
schema ( string $table ) : Cake\Database\Schema\Table Returns the Cake\Database\Schema\Table for $table

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

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

### 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() публичный Метод

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
Результат array

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

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
Результат array

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

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
Результат string

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

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
Результат array

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

Returns an array of constraints for a given table
public constraints ( string $table ) : array
$table string Name of the table to retrieve constraints for
Результат array

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

public getColumnOption ( $options )

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

Returns whether the $tables list given as arguments contains primary keys unsigned.
public hasUnsignedPrimaryKey ( array $tables ) : boolean
$tables array List of tables to check
Результат boolean

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

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
Результат string

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

Returns an array of indexes for a given table
public indexes ( string $table ) : array
$table string Name of the table to retrieve indexes for
Результат array

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

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
Результат array

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

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
Результат array

schema() защищенный Метод

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
Результат Cake\Database\Schema\Table

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

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
Результат string

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

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
Результат string

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

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
Результат string

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

Returns a string-like representation of a value
public value ( string $value, $numbersAsString = false ) : mixed
$value string A value to represent as a string
Результат mixed

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

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

public $returnedData

$schemas защищенное свойство

Schemas list for tables analyzed during migration baking
protected array $schemas
Результат array

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

It helps prevent duplicate calls in case of complex conditions
public array $tableStatements
Результат array