mootensai\enhancedgii\migration\Generator::generateTableName PHP Метод

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

If [[useTablePrefix]] is false, the table name will be returned without change.
public generateTableName ( string $tableName ) : string
$tableName string the table name (which may contain schema prefix)
Результат string the generated table name
    public function generateTableName($tableName)
    {
        if (!$this->useTablePrefix) {
            return $tableName;
        }
        $db = $this->getDbConnection();
        if (preg_match("/^{$db->tablePrefix}(.*?)\$/", $tableName, $matches)) {
            $tableName = '{{%' . $matches[1] . '}}';
        } elseif (preg_match("/^(.*?){$db->tablePrefix}\$/", $tableName, $matches)) {
            $tableName = '{{' . $matches[1] . '%}}';
        }
        return $tableName;
    }