Get table name for given stream name

@param StreamName $streamName
@return string
438353
protected function getTable(StreamName $streamName)
    {
        if (isset($this->streamTableMap[$streamName->toString()])) {
            $tableName = $this->streamTableMap[$streamName->toString()];
        } else {
            $tableName = strtolower($this->getShortStreamName($streamName));

            if (strpos($tableName, "_stream") === false) {
                $tableName.= "_stream";
            }
        }

        return $tableName;
    }
1225512
public function getTableName($includeDbname=false)
    {
    	if (!isset($this->options['real_table_name']) || empty($this->options['real_table_name'])) {
            if(!isset($this->options['table_name']) || empty($this->options['table_name'])) {
                throw new Exception('table is not exist:' . get_called_class());
            }
            
            $realTableName = $this->options['table_name'];
            if (strpos($realTableName, '.') === false && stripos($realTableName, $this->getTablePrefix()) === false) {
                $realTableName = $this->getTablePrefix() . $realTableName;
            }
        } else {
            $realTableName = $this->options['real_table_name'];
        }
        if (isset($realTableName) && strpos($realTableName, '.') === false && $includeDbname) {
            $database = $this->getDatabase();
            $realTableName = (empty($database) ? '' : $database . '.') . $realTableName;
        }
        return $realTableName;
    }
1118835
public static function parseTableName($className)
    {
        $parts = explode('\\', $className);
        $name = end($parts);
        $tableName = null;

        $words = explode('#', Text::camelCaseToSeparator($name, "#"));
        $last = array_pop($words);
        $last = Text::plural(strtolower($last));
        array_push($words, $last);
        foreach ($words as $word) {
            $tableName .= ucfirst($word);
        }
        return lcfirst($tableName);
    }
1345467
public function getTableMetadata(string $tableName): TableMetadata
    {
        if (!array_key_exists($tableName, $this->tableMetadataList)) {
            throw new \RuntimeException('Database "' . $this->databaseName . '" doesn\'t contain table "' . $tableName . '"');
        }

        return $this->tableMetadataList[$tableName];
    }
86627
public function getTables($dbName='') {
        $sql    = !empty($dbName)?'SHOW TABLES FROM '.$dbName:'SHOW TABLES ';
        $result = $this->query($sql);
        $info   =   array();
        foreach ($result as $key => $val) {
            $info[$key] = current($val);
        }
        return $info;
    }
178831
protected function extractTableName($stream)
    {
        if ($stream->getNextExpected(T_WHITESPACE) === null) {
            return false;
        }

        if ($stream->getNextExpected(T_VARIABLE) === null) {
            return false;
        }

        if ($stream->getCurrentText() != '$table') {
            return false;
        }

        if ($stream->getNextExpectedTerminated(['=', T_WHITESPACE], [T_CONSTANT_ENCAPSED_STRING]) === null) {
            return null;
        }

        $tableName = $stream->getCurrentText();
        $tableName = trim($tableName, '\''); 
        $tableName = trim($tableName, '"'); 

        return $tableName;
    }
58884
public function getTableName() {
		if ($this->name === null) {
			$this->name = lcfirst($this->getIntrospectiveData()->name);
		}

		return $this->name;
	}
339439
public function getTableName($addTablePrefix = false, $addDbName = false)
    {
        if (is_null($this->table)) {
            $tmp = get_class($this);
            $this->table = strtolower(substr($tmp, strrpos($tmp, '\\') + 1, -5));
        }

        $dbName = $addDbName ? Config::get($this->getDbConf() . '.master.dbname') . '.' : '';

        if ($addTablePrefix) {
            $tablePrefix = $this->tablePrefix;
            $tablePrefix || $tablePrefix = Config::get($this->getDbConf() . '.master.tableprefix');
            return $dbName . $tablePrefix . $this->table;
        }
        return $dbName . $this->table;
    }
654188
public function getTableName()
    {
        if (is_null($this->_tableName)) {
            $parts = explode('\\', $this->getClassName());
            $name = end($parts);
            $this->_tableName = Text::plural(strtolower($name));
        }
        return $this->_tableName;
    }
476272
public function getTable($name = '')
    {
        if ($name || empty($this->table)) {
            $name      = $name ?: $this->name;
            $tableName = $this->prefix;
            if ($name) {
                $tableName .= Parse::parseName($name);
            }
        } else {
            $tableName = $this->table;
        }
        return $tableName;
    }
462049
public function getTableColumns($tableName = null, $connectionName = null)
    {
        $tableName = $this->validateTableName($tableName);

        return $this->getSchema($connectionName)->listTableColumns($tableName);
    }
737467
public function listTableDetails(string $tableName) : Table
    {
        $tableName = $this->tableMaybeInvalid($tableName);
        return $this->getSchemaManager()->listTableDetails($tableName);
    }
1127845
public function getTable($tableName)
    {
        if (is_array($tableName)) {
            list($tableName, $entitySuffix) = $tableName;
        } else {
            $entitySuffix = null;
        }

        if ($entitySuffix !== null) {
            $tableName .= '_' . $entitySuffix;
        }

        if (!isset($this->_tables[$tableName])) {
            $this->_tables[$tableName] = $this->_resources->getTableName(
                $tableName,
                ResourceConnection::DEFAULT_CONNECTION
            );
        }

        return $this->_tables[$tableName];
    }
675133
public function getTable($tableName)
    {
        $tableName = $this->getFullQualifiedAssetName($tableName);
        if (! isset($this->_tables[$tableName])) {
            throw SchemaException::tableDoesNotExist($tableName);
        }

        return $this->_tables[$tableName];
    }
718148
private String getDbTableName(String schemaName) {
    Preconditions.checkArgument(schemaName.matches(".+_.+_.+"));
    return schemaName.replaceFirst("_", ".").substring(0, schemaName.lastIndexOf('_'));
  }
1361363
public function fetchName(string $filename): ?string
    {
        return str_replace('\\', '/', substr($filename, 0, -1 * (1 + strlen($this->extension))));
    }
1039106
protected function getDBFromFile($fileName)
    {
        $parts = explode('_', preg_replace('/\.sql$/', '', $fileName));
        return isset($parts[1]) ? $parts[1] : null;
    }