. * * @author Daniil Gentili * @copyright 2016-2023 Daniil Gentili * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 * @link https://docs.madelineproto.xyz MadelineProto documentation */ namespace danog\MadelineProto\Db; use ArrayAccess; /** * DB array interface. * * @template TKey as array-key * @template TValue * * @extends ArrayAccess * @extends DbType */ interface DbArray extends DbType, ArrayAccess { /** * Set element. * * @param TKey $index * @param TValue $value */ public function offsetSet(mixed $index, mixed $value): void; /** * Unset element. * @param TKey $index Offset */ public function offsetUnset(mixed $index): void; /** * @see DbArray::isset(); * * @param TKey $index Offset */ public function offsetExists(mixed $index): bool; /** * Get Array copy. * * @psalm-return array */ public function getArrayCopy(): array; }