You are here

protected function InstapageCmsPluginDebugLogModel::getDbStructure in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/models/InstapageCmsPluginDebugLogModel.php \InstapageCmsPluginDebugLogModel::getDbStructure()

Gets database structure

@uses InstapageCmsPluginDBModel::getInstance()

Return value

array Array of table structure descriptions

1 call to InstapageCmsPluginDebugLogModel::getDbStructure()
InstapageCmsPluginDebugLogModel::getLogHTML in core/models/InstapageCmsPluginDebugLogModel.php
Gets the HTML with debug log. Template for th og is in /templates/log.php file.

File

core/models/InstapageCmsPluginDebugLogModel.php, line 163

Class

InstapageCmsPluginDebugLogModel
Class responsible for storing the data in debug log.

Code

protected function getDbStructure() {
  $db = InstapageCmsPluginDBModel::getInstance();
  $tablesDescriptions = array();

  // get description of tables
  $sql = 'DESCRIBE ' . $db->pagesTable;
  $tablesDescriptions[] = [
    'tableName' => $db->pagesTable,
    'description' => $db
      ->getResults($sql),
  ];
  $sql = 'DESCRIBE ' . $db->optionsTable;
  $tablesDescriptions[] = [
    'tableName' => $db->optionsTable,
    'description' => $db
      ->getResults($sql),
  ];
  $sql = 'DESCRIBE ' . $db->debugTable;
  $tablesDescriptions[] = [
    'tableName' => $db->debugTable,
    'description' => $db
      ->getResults($sql),
  ];
  return $tablesDescriptions;
}