Get the configured table prefix.

@return string|null
195190
protected function getTablePrefix()
    {
        $config = $this->app->config['database'];

        $connection = array_get($config, 'default');

        return array_get($config, "connections.{$connection}.prefix");
    }
561102
public function getTableAlias()
    {
        if (null !== $this->oosql_table_alias) {
            return $this->oosql_table_alias;
        }
        $hash = $this->queryHash();
        $this->oosql_table_alias = $hash;
        return $hash;
    }
202949
public static function tableName()
    {
        if (static::TABLE_NAME) {
            return static::TABLE_NAME;
        } else {
            $cn  = str_replace('\\', '_', get_called_class());
            $inf = self::services()->get('inflector');
            
            $tableName = $inf->underscore($inf->pluralize($cn));
            
            return static::tableNamePrefix() . $tableName . static::tableNameSuffix();
        };
    }
1078816
public function get_physical_table_name($table_name){
		$prefix = $this->conf()->prefix;
		if( strlen($prefix) ){
			$prefix = preg_replace('/\_*$/', '_', $prefix);
		}
		return $prefix.$table_name;
	}
672445
private function buildTableName(): string
    {
        $table = '{db_prefix}' . $this->table;
        
        $no_alias_methods = [
            'REPLACE',
            'INSERT'
        ];
        
        if (in_array($this->method, $no_alias_methods)) {
            return $table;
        }
        
        if (! empty($this->alias)) {
            $table .= ' AS ' . $this->alias;
        }
        
        return $table;
    }
393427
public function checkTablePrefix() {
        if (!$this->tablePrefix) {
            $this->setTablePrefix($this->in('What table prefix would you like to use?'));
        }

        $this->out(sprintf('Table Prefix: <info>%s</info>', $this->tablePrefix));

        $answer = strtoupper($this->in('Is this correct?', array('Y', 'N')));

        if ($answer === 'N') {
            $this->tablePrefix = null;
            $this->checkTablePrefix();
        }

        $this->out('<success>Table prefix set, proceeding...</success>');
        return true;
    }
885345
public function getTable()
    {
        if (isset($this->table)) {
            return $this->table;
        }

        $moduleNumber = $this->getModuleNumber();

        $baseName = str_replace('\\', '', Str::snake(Str::plural(class_basename($this))));

        // if it is a translated table, convert to CMS convention
        $translationExtension = '_' . str_plural(strtolower(config('translatable.translation_suffix', 'translation')));

        if (ends_with($baseName, $translationExtension)) {
            $baseName = str_plural(substr($baseName, 0, -1 * strlen($translationExtension)))
                      . config('pxlcms.translatable.translation_table_postfix');
        }

        return config('pxlcms.tables.prefix')
            . ($moduleNumber ? 'm' . $moduleNumber . '_' : '')
            . $baseName;
    }
894094
public static function prefixTables()
    {
        $result = array();
        foreach (func_get_args() as $table) {
            $result[] = self::prefixTable($table);
        }
        return $result;
    }
115163
public function prefixTables($table, bool $use_identifier = false)
    {
        if ($table instanceof \Closure || is_resource($table)) {
            throw new \InvalidArgumentException(
                "Invalid value to be quote, table value could not be instance of `Closure` or as a `Resource`",
                E_USER_ERROR
            );
        }

        $prefix = $this->getTablePrefix();
        if (is_array($table)) {
            foreach ($table as $key => $value) {
                $table[$key] = $this->prefixTables($value, $use_identifier);
            }
            return $table;
        }
        if (is_object($table)) {
            foreach (get_object_vars($table) as $key => $value) {
                $table->{$key} = $this->prefixTables($value, $use_identifier);
            }
            return $table;
        }
        if (!is_string($table)) {
            return null;
        }
        if (strpos($table, $this->currentQuoteIdentifier) !== false) {
            $use_identifier = true;
        }
        if (!empty($prefix) && is_string($prefix) && trim($prefix)) {
            $tableArray = explode('.', $table);
            $tableArray    = $this->trimTableSelector($tableArray);
            if (count($tableArray) > 1) {
                $connectionParams = $this->getConnectionParams();
                if (isset($connectionParams['dbname']) && $tableArray[0] == $connectionParams['dbname']) {
                    $tableArray[1] = $this->prefixTableCallback($tableArray);
                }
                if ($use_identifier) {
                    return $this->currentQuoteIdentifier
                           . implode("{$this->currentQuoteIdentifier}.{$this->currentQuoteIdentifier}", $tableArray)
                           . $this->currentQuoteIdentifier;
                } else {
                    return implode(".", $tableArray);
                }
            } else {
                $table = $this->prefixTableCallback($tableArray[0]);
            }
        }

        return $use_identifier
            ? $this->currentQuoteIdentifier.$table.$this->currentQuoteIdentifier
            : $table;
    }
453487
public static function stripPrefix($table, $prefix = null)
    {
        $prefix = $prefix ?: Ioc::getDatabase()->getPrefix();

        $num = strlen($prefix);

        if (substr($table, 0, $num) == $prefix) {
            $table = '#__' . substr($table, $num);
        }

        return $table;
    }
450677
public static function getPrefix()
    {
        if(empty(self::$config)) self::$config=Config::get('database');
        return isset(self::$config['prefix']) ? self::$config['prefix'] : '';
    }
894087
public function getTableName(): string
    {
        if ($this->tableName === null)
        {
            $this->tableName = (new \ReflectionClass($this))->getShortName();
        }

        return $this->tableName;
    }
637707
private function prefixTableCallback(string $table) : string
    {
        $prefix = $this->getTablePrefix();
        if (!empty($prefix) && is_string($prefix) && trim($prefix)) {
            $table = (strpos($table, $prefix) === 0)
                ? $table
                : $prefix.$table;
        }

        return $table;
    }
1373210
public function getTableWithoutPrefix()
    {
        if (!$this->prefix) {
            return $this->table;
        }

        return substr($this->table, strlen($this->prefix) + 1);
    }
556412
public function getPrefix()
    {
        if ($this->prefix == null) {
            $this->prefix = substr($this->msisdn, 0, 3);
        }

        return $this->prefix;
    }
175062
public function getTable(){
		$table = str_replace(':', '', $this->source);
		$prefix = $this->connection->getPrefix();
		return $prefix . $table;
	}
1071402
public function getTable() {

		if(null === $this -> table) {

			$path  = $this -> getNamespace($this, ['directory', 'entity'], ['directory', 'entity']) . Application :: get(['prefix', 'entity']);
			$path  = str_replace(DIRECTORY_SEPARATOR, '\\', $path);
			$class = new \ReflectionClass(get_class($this));
			
			$this -> table = NameConvert :: toSnakecase(str_replace($path, '', $class -> name));
		}

		return $this -> table;
	}