Class yii\sphinx\gii\model\Generator
Inheritance | yii\sphinx\gii\model\Generator » yii\gii\Generator |
---|---|
Available since version | 2.0 |
This generator will generate one or multiple ActiveRecord classes for the specified Sphinx index.
Public Properties
Public Methods
Protected Methods
Method | Description | Defined By |
---|---|---|
generateClassName() | Generates a class name from the specified table name. | yii\sphinx\gii\model\Generator |
getDbConnection() | yii\sphinx\gii\model\Generator | |
getIndexNames() | yii\sphinx\gii\model\Generator |
Property Details
Method Details
public void attributeLabels ( ) |
public void autoCompleteData ( ) |
public void generate ( ) |
Generates a class name from the specified table name.
protected string generateClassName ( $indexName ) | ||
$indexName | string | The table name (which may contain schema prefix) |
return | string | The generated class name |
---|
Generates the table name by considering table prefix.
If $useIndexPrefix is false, the table name will be returned without change.
public string generateIndexName ( $indexName ) | ||
$indexName | string | The table name (which may contain schema prefix) |
return | string | The generated table name |
---|
Generates the attribute labels for the specified table.
public array generateLabels ( $table ) | ||
$table | \yii\db\TableSchema | The table schema |
return | array | The generated attribute labels (name => label) |
---|
Generates validation rules for the specified index.
public array generateRules ( $index ) | ||
$index | yii\sphinx\IndexSchema | The index schema |
return | array | The generated validation rules |
---|
protected yii\sphinx\Connection getDbConnection ( ) | ||
return | yii\sphinx\Connection | The Sphinx connection as specified by $db. |
---|
public void getDescription ( ) |
protected array getIndexNames ( ) | ||
return | array | The index names that match the pattern specified by $indexName. |
---|
public void getName ( ) |
public void hints ( ) |
public void requiredTemplates ( ) |
public void rules ( ) |
public void stickyAttributes ( ) |
Validates the $db attribute.
public void validateDb ( ) |
Validates the $indexName attribute.
public void validateIndexName ( ) |
Validates the $modelClass attribute.
public void validateModelClass ( ) |
Validates the $ns attribute.
public void validateNamespace ( ) |