function Schema::__construct

Same name in this branch
  1. main core/modules/pgsql/src/Driver/Database/pgsql/Schema.php \Drupal\pgsql\Driver\Database\pgsql\Schema::__construct()
  2. main core/lib/Drupal/Core/Database/Schema.php \Drupal\Core\Database\Schema::__construct()
Same name and namespace in other branches
  1. 11.x core/modules/pgsql/src/Driver/Database/pgsql/Schema.php \Drupal\pgsql\Driver\Database\pgsql\Schema::__construct()
  2. 11.x core/lib/Drupal/Core/Database/Schema.php \Drupal\Core\Database\Schema::__construct()
  3. 10 core/modules/pgsql/src/Driver/Database/pgsql/Schema.php \Drupal\pgsql\Driver\Database\pgsql\Schema::__construct()
  4. 10 core/lib/Drupal/Core/Database/Schema.php \Drupal\Core\Database\Schema::__construct()
  5. 9 core/lib/Drupal/Core/Database/Schema.php \Drupal\Core\Database\Schema::__construct()
  6. 8.9.x core/lib/Drupal/Core/Database/Schema.php \Drupal\Core\Database\Schema::__construct()
  7. 11.x core/lib/Drupal/Core/Database/SchemaDefinition/Schema.php \Drupal\Core\Database\SchemaDefinition\Schema::__construct()

Constructor.

Parameters

SchemaDefinitionType $type: The type of Drupal feature providing the schema.

string $name: The schema name.

list<Table> $tables: A list of Table objects.

File

core/lib/Drupal/Core/Database/SchemaDefinition/Schema.php, line 25

Class

Schema
Describes a database schema as a collection of database objects.

Namespace

Drupal\Core\Database\SchemaDefinition

Code

public function __construct(public readonly SchemaDefinitionType $type, public readonly string $name, public readonly array $tables) {
  $this->validate();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.