function Schema::validate

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Database/SchemaDefinition/Schema.php \Drupal\Core\Database\SchemaDefinition\Schema::validate()

Validates the properties of the value object.

Throws

\Drupal\Core\Database\Exception\SchemaDefinitionException

1 call to Schema::validate()
Schema::__construct in core/lib/Drupal/Core/Database/SchemaDefinition/Schema.php
Constructor.

File

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

Class

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

Namespace

Drupal\Core\Database\SchemaDefinition

Code

private function validate() : void {
  if ($this->tables && !Inspector::assertAllObjects($this->tables, Table::class)) {
    throw new SchemaDefinitionException("All members of the 'tables' argument of a Schema must be Table objects");
  }
}

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