Menu

## Schema
in package

Schema.php : 20

Database schema class

This class is responsible for retrieving and managing database schema information.

##### Tags

see
  https://www.kotchasan.com/

### Table of Contents

$db : Driver
  Database object
$tables : array<string|int, mixed>
  List of loaded schemas
create() : static
  Create Schema Class
fields() : array<string|int, mixed>
  Get the field names of a table
init() : mixed
  Initialize the schema data for a table

### Properties

#### $db

Schema.php : 27

Database object

`private Driver $db`

#### $tables

Schema.php : 33

List of loaded schemas

`private array<string|int, mixed> $tables = []`

### Methods

#### create()

Schema.php : 42

Create Schema Class

`public static create(Driver $db) : static`

##### Parameters

$db : Driver

  The database driver object

##### Return values

static —

#### fields()

Schema.php : 60

Get the field names of a table

`public fields(string $table) : array<string|int, mixed>`

Retrieve all field names in the specified table.

##### Parameters

$table : string

  The table name

##### Tags

throws
  InvalidArgumentException

  if the table name is empty

##### Return values

array<string|int, mixed> —

The array of field names

#### init()

Schema.php : 75

Initialize the schema data for a table

`private init(string $table) : mixed`

##### Parameters

$table : string

  The table name

##### Return values

mixed —

## Search results