Class lajax\projectscanner\scanners\DbScanner
| Inheritance | lajax\projectscanner\scanners\DbScanner » yii\base\Object |
|---|---|
| Implements | lajax\projectscanner\scanners\ScannerInterface |
| Available since version | 1.0 |
Detecting existing language elements in database.
The connection ids of the scanned databases and the table/field names can be defined in the configuration file of translateManager examples:
'tables' => [
[
'connection' => 'db',
'table' => 'language',
'columns' => ['name', 'name_ascii'],
'category' => 'tableName',
],
[
'connection' => 'db',
'table' => 'tag',
'columns' => ['name'],
'category' => 'tableName',
],
[
'connection' => 'db',
'table' => 'category',
'columns' => ['name', 'description']
]
]
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $category | string | Default database category. | lajax\projectscanner\scanners\DbScanner |
| $scanner | lajax\projectscanner\Scanner | Component containing the detected language elements | lajax\projectscanner\scanners\DbScanner |
| $tables | array | Array containing the table ids to process. | lajax\projectscanner\scanners\DbScanner |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| execute() | Executes the scanning statement. | lajax\projectscanner\scanners\DbScanner |
| init() | lajax\projectscanner\scanners\DbScanner |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| getCategory() | Returns the language category. | lajax\projectscanner\scanners\DbScanner |
| normalizeTablename() | Returns the normalized database table name. | lajax\projectscanner\scanners\DbScanner |
| scanTable() | Scanning database table | lajax\projectscanner\scanners\DbScanner |
Property Details
Default database category.
Component containing the detected language elements
Array containing the table ids to process.
Method Details
Executes the scanning statement.
| public void execute ( ) |
Returns the language category.
| protected string getCategory ( $tables ) | ||
| $tables | array | |
| public void init ( ) |
Returns the normalized database table name.
| protected string normalizeTablename ( $tableName ) | ||
| $tableName | string | Database table name. |
Scanning database table
| protected void scanTable ( $tables ) | ||
| $tables | array | |