src/Codeception/Module/WPDb.php
public function grabPrefixedTableNameFor($tableName = '')
    {
        $idFrag = '';
        if (!(in_array($tableName, $this->uniqueTables) || $this->blogId == 1)) {
            $idFrag = empty($this->blogId) ? '' : "{$this->blogId}_";
        }

        $tableName = $this->config['tablePrefix'] . $idFrag . $tableName;

        return $tableName;
    }
public function grabPrefixedTableNameFor($tableName = '')
    {
        $idFrag = '';
        if (!(in_array($tableName, $this->uniqueTables) || $this->blogId == 1)) {
            $idFrag = empty($this->blogId) ? '' : "{$this->blogId}_";
        }

        $tableName = $this->config['tablePrefix'] . $idFrag . $tableName;

        return $tableName;
    }
public function grabPrefixedTableNameFor ( $ tableName = '' ) { $ idFrag = '' ; if ( ! ( in_array ( $ tableName , $ this -> uniqueTables ) || $ this -> blogId == 1 ) ) { $ idFrag = empty ( $ this -> blogId ) ? '' : "{$this->blogId}_" ; } $ tableName = $ this -> config [ 'tablePrefix' ] . $ idFrag . $ tableName ; return $ tableName ; }
Returns a prefixed table name for the current blog.

If the table is not one to be prefixed (e.g. `users`) then the proper table name will be returned.

@example
```php
// Will return wp_users.
$usersTable = $I->grabPrefixedTableNameFor('users');
// Will return wp_options.
$optionsTable = $I->grabPrefixedTableNameFor('options');
// Use a different blog and get its options table.
$I->useBlog(2);
$blogOptionsTable = $I->grabPrefixedTableNameFor('options');
```

@param  string $tableName The table name, e.g. `options`.

@return string            The prefixed table name, e.g. `wp_options` or `wp_2_options`.
Returns a prefixed table name for the current blog .