Link Search Menu Expand Document

danog\MadelineProto\Db\DriverArray

Back to index

Author: Daniil Gentili daniil@daniil.it

Array caching trait.

Method list:

  • initConnection()
  • initStartup()
  • getTable()
  • setTable()
  • isset(mixed $key): \Promise<bool> true if the offset exists, otherwise false
  • getInstance(\danog\MadelineProto\Db\DbArray|array|null $previous, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings)
  • getArrayCopy()
  • unset()
  • set()
  • offsetGet(string|int $index)
  • count(): \Amp\Promise<int>
  • clear()
  • getIterator()

Methods:

initConnection()

Initialize connection.

initStartup()

Initialize on startup.

getTable()

Get the value of table.

setTable()

Set the value of table.

isset(mixed $key): \Promise<bool> true if the offset exists, otherwise false

Check if key isset.

Parameters:

  • $key: mixed

Return value: true if the offset exists, otherwise false

getInstance(\danog\MadelineProto\Db\DbArray|array|null $previous, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings)

Parameters:

  • $previous: \danog\MadelineProto\Db\DbArray|array|null
  • $settings: \danog\MadelineProto\Settings\Database\DatabaseAbstract

Fully typed return value:

\Amp\Promise<static>

See also:

getArrayCopy()

Get Array copy.

Fully typed return value:

\Amp\Promise<array<string|int, \T>>

See also:

  • \T
  • \Amp\Promise

unset()

Unset element.

Fully typed return value:

\Amp\Promise<mixed>

See also:

  • \Amp\Promise

set()

Set element.

Parameters:

See also:

  • \T

offsetGet(string|int $index)

Get element.

Parameters:

  • $index: string|int

Fully typed return value:

\Amp\Promise<\T>

See also:

  • \T
  • \Amp\Promise

count(): \Amp\Promise<int>

Count number of elements.

See also:

  • \Amp\Promise

clear()

Clear all elements.

getIterator()

Get iterator.


Generated by danog/phpdoc