public function getForeignTableNames($tableName = null, $connectionName = null)
    {
        $foreignKeys = $this->getTableForeignKeys($tableName, $connectionName);
        $tableNames  = [];

        foreach ($foreignKeys as $foreignKey) {
            $tableNames[] = $foreignKey->getForeignTableName();
        }

        return array_unique($tableNames);
    }
public function getForeignTableNames($tableName = null, $connectionName = null)
    {
        $foreignKeys = $this->getTableForeignKeys($tableName, $connectionName);
        $tableNames  = [];

        foreach ($foreignKeys as $foreignKey) {
            $tableNames[] = $foreignKey->getForeignTableName();
        }

        return array_unique($tableNames);
    }
public function getForeignTableNames ( $ tableName = null , $ connectionName = null ) { $ foreignKeys = $ this -> getTableForeignKeys ( $ tableName , $ connectionName ) ; $ tableNames = [ ] ; foreach ( $ foreignKeys as $ foreignKey ) { $ tableNames [ ] = $ foreignKey -> getForeignTableName ( ) ; } return array_unique ( $ tableNames ) ; }
Get tables foreign table names from foreign keys

@param string      $tableName      table name
@param string|null $connectionName database connection name (if null default connection is used)

@return string[]
Get tables foreign table names from foreign keys