PHP Class lajax\translatemanager\services\scanners\ScannerDatabase

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' => 'database-table-name', ], [ 'connection' => 'db', 'table' => 'category', 'columns' => ['name', 'description'] ] ] ~~~
Since: 1.0
Author: Lajos Molnár ([email protected])
Show file Open project: lajax/yii2-translate-manager

Public Methods

Method Description
__construct ( Scanner $scanner )
run ( ) Scanning database tables defined in configuration file. Searching for language elements yet to be translated.

Private Methods

Method Description
_getCategory ( array $tables ) : string Returns the language category.
_normalizeTablename ( string $tableName ) : string Returns the normalized database table name.
_scanningTable ( array $tables ) Scanning database table

Method Details

__construct() public method

public __construct ( Scanner $scanner )
$scanner lajax\translatemanager\services\Scanner

run() public method

Scanning database tables defined in configuration file. Searching for language elements yet to be translated.
public run ( )