src/Resources/BaseDbTableResource.php
public function doesTableExist($name, $returnName = false)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('Table name cannot be empty.');
        }

        $result = $this->parent->getTableNames();
        // re-key by alias
        $tables = [];
        foreach ($result as $table) {
            $tables[strtolower($table->getName(true))] = $table;
        }
        //	Search normal, return real name
        $ndx = strtolower($name);
        if (isset($tables[$ndx])) {
            return $returnName ? $tables[$ndx]->name : true;
        }

        return false;
    }
public function doesTableExist($name, $returnName = false)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('Table name cannot be empty.');
        }

        $result = $this->parent->getTableNames();
        // re-key by alias
        $tables = [];
        foreach ($result as $table) {
            $tables[strtolower($table->getName(true))] = $table;
        }
        //	Search normal, return real name
        $ndx = strtolower($name);
        if (isset($tables[$ndx])) {
            return $returnName ? $tables[$ndx]->name : true;
        }

        return false;
    }
@param string $name       The name of the table to check
@param bool   $returnName If true, the table name is returned instead of TRUE

@return bool
@throws \Exception