final class Picker

Various methods for selecting what you want.

Methods

field(string $field)

Set a field value.

driver(string $driver)

Set a database driver.

string|null
getDriver()

Get a driver value.

type(string $type)

Set a database field type.

Column|null
get(string|null $driver = null, string|null $field = null, string|null $type = null)

Get a specific column

array
toArray()

Get an array of An array of Table instances.

static Picker
of(array $values)

Create a instance.

Details

at line 30
Picker field(string $field)

Set a field value.

Parameters

string $field

The field name.

Return Value

Picker

The method set field and it returns the current instance

Examples

Picker::of(\Cable8mm\Xeed\Column[])->driver('mysql')->field('name')->get()

at line 45
Picker driver(string $driver)

Set a database driver.

Parameters

string $driver

The database driver name

Return Value

Picker

The method set driver and it returns the current instance

Examples

Picker::of(\Cable8mm\Xeed\Column[])->driver($xeed->driver)->field('string')->get()

at line 59
string|null getDriver()

Get a driver value.

Return Value

string|null

The driver value.

Examples

Picker::of(\Cable8mm\Xeed\Column[])->driver($xeed->driver)->getDriver()

at line 71
Picker type(string $type)

Set a database field type.

Parameters

string $type

The column type

Return Value

Picker

Examples

Picker::of(\Cable8mm\Xeed\Column[])->type('varchar')

at line 93
Column|null get(string|null $driver = null, string|null $field = null, string|null $type = null)

Get a specific column

Parameters

string|null $driver

The driver.

string|null $field

The field.

string|null $type

The type.

Return Value

Column|null

The Column instance

Exceptions

InvalidArgumentException

Examples

Picker::of(\Cable8mm\Xeed\Column[])->driver($xeed->driver)->field('string')->get()
Picker::of(\Cable8mm\Xeed\Column[])->get(driver: 'mysql', field: 'name', type: 'varchar')->get()
Picker::of(\Cable8mm\Xeed\Column[])->get(driver: 'mysql', field: 'name')->get()
Picker::of(\Cable8mm\Xeed\Column[])->get(driver: 'mysql', type: 'varchar')->get()

at line 129
array toArray()

Get an array of An array of Table instances.

Return Value

array

An array of An array of \Cable8mm\Xeed\Table instances.

at line 142
static Picker of(array $values)

Create a instance.

Parameters

array $values

An array of \Cable8mm\Xeed\Table instances.

Return Value

Picker

The Picker instance.

Examples

Picker::of($xeed->attach()->getTable('xeeds')->getColumns())->driver($xeed->driver)->field('string')->get()