xref: /php-src/ext/dba/dba.stub.php (revision 2097237d)
1<?php
2
3/** @generate-class-entries */
4
5namespace Dba {
6    /**
7     * @strict-properties
8     * @not-serializable
9     */
10    final class Connection
11    {
12    }
13}
14
15namespace {
16#ifdef DBA_LMDB
17    /** @var int */
18    const DBA_LMDB_USE_SUB_DIR = 0;
19    /**
20     * @var int
21     * @cvalue MDB_NOSUBDIR
22     */
23    const DBA_LMDB_NO_SUB_DIR = UNKNOWN;
24#endif
25
26    function dba_popen(string $path, string $mode, ?string $handler = null, int $permission = 0o644, int $map_size = 0, ?int $flags = null): Dba\Connection|false {}
27
28    function dba_open(string $path, string $mode, ?string $handler = null, int $permission = 0o644, int $map_size = 0, ?int $flags = null): Dba\Connection|false {}
29
30    function dba_close(Dba\Connection $dba): void {}
31
32    function dba_exists(string|array $key, Dba\Connection $dba): bool {}
33
34    /**
35     * @param Dba\Connection|int $dba overloaded legacy signature has params flipped
36     * @param Dba\Connection|int $skip overloaded legacy signature has params flipped
37     */
38    function dba_fetch(string|array $key, $dba, $skip = 0): string|false {}
39
40    /** @return array<int, string>|false */
41    function dba_key_split(string|false|null $key): array|false {}
42
43    function dba_firstkey(Dba\Connection $dba): string|false {}
44
45    function dba_nextkey(Dba\Connection $dba): string|false {}
46
47    function dba_delete(string|array $key, Dba\Connection $dba): bool {}
48
49    function dba_insert(string|array $key, string $value, Dba\Connection $dba): bool {}
50
51    function dba_replace(string|array $key, string $value, Dba\Connection $dba): bool {}
52
53    function dba_optimize(Dba\Connection $dba): bool {}
54
55    function dba_sync(Dba\Connection $dba): bool {}
56
57    /**
58     * @return array<int|string, string>
59     * @refcount 1
60     */
61    function dba_handlers(bool $full_info = false): array {}
62
63    /** @return array<int, string> */
64    function dba_list(): array {}
65}
66