public function getTables($db = NULL, $use_cache = true): array
    {
        if (!$db) {
            $db = Configuration::getInstance()->get('db')['name'];
            if (!$db) {
                return [];
            }
        }

        if (Settings::isCacheEnabled()) {
            $cache_key = 'db_table_list_all';
            $cacher = Cacher::getInstance()->getDefaultCacher();

            if (!isset(self::$_table_list[$db])) {
                self::$_table_list[$db] = $cacher->get($cache_key);
            }
        }

        if (!isset(self::$_table_list[$db]) || !$use_cache) {
            self::$_table_list[$db] = $this->q_pairs('SHOW TABLES FROM `' . $db . '`');
        }

        if (Settings::isCacheEnabled()) {
            $cacher->set($cache_key, self::$_table_list[$db], 86400);
        }

        return self::$_table_list[$db];
    }
public function getTables($db = NULL, $use_cache = true): array
    {
        if (!$db) {
            $db = Configuration::getInstance()->get('db')['name'];
            if (!$db) {
                return [];
            }
        }

        if (Settings::isCacheEnabled()) {
            $cache_key = 'db_table_list_all';
            $cacher = Cacher::getInstance()->getDefaultCacher();

            if (!isset(self::$_table_list[$db])) {
                self::$_table_list[$db] = $cacher->get($cache_key);
            }
        }

        if (!isset(self::$_table_list[$db]) || !$use_cache) {
            self::$_table_list[$db] = $this->q_pairs('SHOW TABLES FROM `' . $db . '`');
        }

        if (Settings::isCacheEnabled()) {
            $cacher->set($cache_key, self::$_table_list[$db], 86400);
        }

        return self::$_table_list[$db];
    }
public function getTables ( $ db = NULL , $ use_cache = true ) : array { if ( ! $ db ) { $ db = Configuration :: getInstance ( ) -> get ( 'db' ) [ 'name' ] ; if ( ! $ db ) { return [ ] ; } } if ( Settings :: isCacheEnabled ( ) ) { $ cache_key = 'db_table_list_all' ; $ cacher = Cacher :: getInstance ( ) -> getDefaultCacher ( ) ; if ( ! isset ( self :: $ _table_list [ $ db ] ) ) { self :: $ _table_list [ $ db ] = $ cacher -> get ( $ cache_key ) ; } } if ( ! isset ( self :: $ _table_list [ $ db ] ) || ! $ use_cache ) { self :: $ _table_list [ $ db ] = $ this -> q_pairs ( 'SHOW TABLES FROM `' . $ db . '`' ) ; } if ( Settings :: isCacheEnabled ( ) ) { $ cacher -> set ( $ cache_key , self :: $ _table_list [ $ db ] , 86400 ) ; } return self :: $ _table_list [ $ db ] ; }
Show tables in database

@param string $db - database name
@param bool $use_cache
@return array - list of non-temporary tables, by pairs key/value
Show tables in database