Link Search Menu Expand Document

danog\MadelineProto\Db\DbArray

Back to index

Author: Daniil Gentili daniil@daniil.it

DB array interface.

Method list:

  • getArrayCopy(): \Amp\Promise
  • isset(string|int $key): \Amp\Promise
  • unset(string|int $key): \Amp\Promise
  • set(string|int $index, mixed $value): \Amp\Promise
  • offsetGet(string|int $index): \Amp\Promise
  • offsetSet(string|int $index, mixed $value): void
  • count(): \Amp\Promise<int>
  • clear(): \Amp\Promise
  • getIterator()
  • getInstance(string $table, null|\danog\MadelineProto\Db\DbType|array $previous, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise<self>

Methods:

getArrayCopy(): \Amp\Promise

Get Array copy.

Fully typed return value:

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

See also:

  • \T
  • \Amp\Promise

isset(string|int $key): \Amp\Promise

Check if element is set.

Parameters:

  • $key: string|int

Fully typed return value:

\Amp\Promise<bool>

See also:

  • \Amp\Promise

unset(string|int $key): \Amp\Promise

Unset element.

Parameters:

  • $key: string|int

Fully typed return value:

\Amp\Promise<mixed>

See also:

  • \Amp\Promise

set(string|int $index, mixed $value): \Amp\Promise

Set element.

Parameters:

  • $index: string|int
  • $value: mixed
    Full type: \T

See also:

  • \T
  • \Amp\Promise

offsetGet(string|int $index): \Amp\Promise

Get element.

Parameters:

  • $index: string|int

Fully typed return value:

\Amp\Promise<\T>

See also:

  • \T
  • \Amp\Promise

offsetSet(string|int $index, mixed $value): void

Set element.

Parameters:

  • $index: string|int
  • $value: mixed
    Full type: \T

See also:

  • \T

count(): \Amp\Promise<int>

Count number of elements.

See also:

  • \Amp\Promise

clear(): \Amp\Promise

Clear all elements.

See also:

  • \Amp\Promise

getIterator()

Get iterator.

getInstance(string $table, null|\danog\MadelineProto\Db\DbType|array $previous, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise<self>

Parameters:

  • $table: string
  • $previous: null|\danog\MadelineProto\Db\DbType|array
  • $settings: \danog\MadelineProto\Settings\Database\DatabaseAbstract

See also:


Generated by danog/phpdoc