services/scanners/ScannerDatabase.php
private function _scanningTable($tables)
    {
        $this->_scanner->stdout('Extracting mesages from ' . $tables['table'] . '.' . implode(',', $tables['columns']), Console::FG_GREEN);
        $query = new \yii\db\Query();
        $data = $query->select($tables['columns'])
            ->from($tables['table'])
            ->createCommand(Yii::$app->{$tables['connection']})
            ->queryAll();
        $category = $this->_getCategory($tables);
        foreach ($data as $columns) {
            $columns = array_map('trim', $columns);
            foreach ($columns as $column) {
                $this->_scanner->addLanguageItem($category, $column);
            }
        }
    }
private function _scanningTable($tables)
    {
        $this->_scanner->stdout('Extracting mesages from ' . $tables['table'] . '.' . implode(',', $tables['columns']), Console::FG_GREEN);
        $query = new \yii\db\Query();
        $data = $query->select($tables['columns'])
            ->from($tables['table'])
            ->createCommand(Yii::$app->{$tables['connection']})
            ->queryAll();
        $category = $this->_getCategory($tables);
        foreach ($data as $columns) {
            $columns = array_map('trim', $columns);
            foreach ($columns as $column) {
                $this->_scanner->addLanguageItem($category, $column);
            }
        }
    }
private function _scanningTable ( $ tables ) { $ this -> _scanner -> stdout ( 'Extracting mesages from ' . $ tables [ 'table' ] . '.' . implode ( ',' , $ tables [ 'columns' ] ) , Console :: FG_GREEN ) ; $ query = new \ yii \ db \ Query ( ) ; $ data = $ query -> select ( $ tables [ 'columns' ] ) -> from ( $ tables [ 'table' ] ) -> createCommand ( Yii :: $ app -> { $ tables [ 'connection' ] } ) -> queryAll ( ) ; $ category = $ this -> _getCategory ( $ tables ) ; foreach ( $ data as $ columns ) { $ columns = array_map ( 'trim' , $ columns ) ; foreach ( $ columns as $ column ) { $ this -> _scanner -> addLanguageItem ( $ category , $ column ) ; } } }
Scanning database table

@param array $tables
Scanning database table