Pop\Db\Adapter\Pdo::loadTables PHP Метод

loadTables() защищенный Метод

Get an array of the tables of the database.
protected loadTables ( ) : array
Результат array
    protected function loadTables()
    {
        $tables = array();
        if (stripos($this->dsn, 'sqlite') !== false) {
            $sql = "SELECT name FROM sqlite_master WHERE type IN ('table', 'view') AND name NOT LIKE 'sqlite_%' UNION ALL SELECT name FROM sqlite_temp_master WHERE type IN ('table', 'view') ORDER BY 1";
            $this->query($sql);
            while (($row = $this->fetch()) != false) {
                $tables[] = $row['name'];
            }
        } else {
            if (stripos($this->dsn, 'pgsql') !== false) {
                $sql = "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'";
            } else {
                if (stripos($this->dsn, 'sqlsrv') !== false) {
                    $sql = "SELECT name FROM " . $this->database . "..sysobjects WHERE xtype = 'U'";
                } else {
                    $sql = 'SHOW TABLES';
                }
            }
            $this->query($sql);
            while (($row = $this->fetch()) != false) {
                foreach ($row as $value) {
                    $tables[] = $value;
                }
            }
        }
        return $tables;
    }