You are here

public static function Schema::getSchema in Anti Spam by CleanTalk 9.1.x

Same name and namespace in other branches
  1. 8.4 src/lib/Cleantalk/Common/Schema.php \Cleantalk\Common\Schema::getSchema()

Parameters

null|string $table Name of called table:

Return value

array|string Array of schemas or query string for selected scheme.

Throws

\Exception Throws if calling un-existed schema

1 call to Schema::getSchema()
FirewallUpdater::createTempTables in src/lib/Cleantalk/Common/Firewall/FirewallUpdater.php
Creatin a temporary updating table

File

src/lib/Cleantalk/Common/Schema.php, line 55

Class

Schema

Namespace

Cleantalk\Common

Code

public static function getSchema($table = null) {
  if (is_null($table)) {
    return self::$schemas;
  }
  if (array_key_exists($table, self::$schemas)) {
    return self::$schemas[$table];
  }
  throw new \Exception('Called table scheme not exist.');
}