yii\db\Schema::getTableNames PHP Méthode

getTableNames() public méthode

Returns all table names in the database.
public getTableNames ( string $schema = '', boolean $refresh = false ) : string[]
$schema string the schema of the tables. Defaults to empty string, meaning the current or default schema name. If not empty, the returned table names will be prefixed with the schema name.
$refresh boolean whether to fetch the latest available table names. If this is false, table names fetched previously (if available) will be returned.
Résultat string[] all table names in the database.
    public function getTableNames($schema = '', $refresh = false)
    {
        if (!isset($this->_tableNames[$schema]) || $refresh) {
            $this->_tableNames[$schema] = $this->findTableNames($schema);
        }
        return $this->_tableNames[$schema];
    }