PHP Класс luya\console\commands\BaseCrudController

As we can not ensure to access the gii model generate class we have to copy the base of the class, check the see section.
См. также: https://github.com/yiisoft/yii2-gii/blob/master/generators/model/Generator.php
Автор: Basil Suter ([email protected])
Наследование: extends luya\console\Command
Показать файл Открыть проект

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

Свойство Тип Описание
$generateLabelsFromComments Whether to generate labels from comments or not.
$tableName The name of the table.
$useSchemaName Whether to use schem name or not

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

Свойство Тип Описание
$classNames A list of class names.
$tableNames A list of table names.

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

Метод Описание
generateLabels ( yii\db\TableSchema $table ) : array Generates the attribute labels for the specified table.
generateRules ( yii\db\TableSchema $table ) : array Generates validation rules for the specified table.
getSqlTablesArray ( ) : array Get the sql tables from the current database connection

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

Метод Описание
generateClassName ( string $tableName, boolean $useSchemaName = null ) : string Generates a class name from the specified table name.
getDbConnection ( ) : Connection
isColumnAutoIncremental ( yii\db\TableSchema $table, array $columns ) : boolean Checks if any of the specified columns is auto incremental.

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

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

Generates a class name from the specified table name.
protected generateClassName ( string $tableName, boolean $useSchemaName = null ) : string
$tableName string the table name (which may contain schema prefix)
$useSchemaName boolean should schema name be included in the class name, if present
Результат string the generated class name

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

Generates the attribute labels for the specified table.
public generateLabels ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table schema
Результат array the generated attribute labels (name => label)

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

Generates validation rules for the specified table.
public generateRules ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table schema
Результат array the generated validation rules

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

protected getDbConnection ( ) : Connection
Результат Connection the DB connection as specified by [[db]].

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

Get the sql tables from the current database connection
public getSqlTablesArray ( ) : array
Результат array An array with all sql tables.

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

Checks if any of the specified columns is auto incremental.
protected isColumnAutoIncremental ( yii\db\TableSchema $table, array $columns ) : boolean
$table yii\db\TableSchema the table schema
$columns array columns to check for autoIncrement property
Результат boolean whether any of the specified columns is auto incremental.

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

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

A list of class names.
protected $classNames

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

Whether to generate labels from comments or not.
public $generateLabelsFromComments

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

The name of the table.
public $tableName

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

A list of table names.
protected $tableNames

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

Whether to use schem name or not
public $useSchemaName