summaryrefslogtreecommitdiff
path: root/ext/pdo/pdo_dbh.stub.php
blob: d25408db7e197faf8e9f77baebbfafbe48a4f998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php

/** @generate-class-entries */

class PDO
{
    public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null) {}

    /** @return bool */
    public function beginTransaction() {}

    /** @return bool */
    public function commit() {}

    /** @return string|null */
    public function errorCode() {}

    /** @return array */
    public function errorInfo() {}

    /** @return int|false */
    public function exec(string $statement) {}

    /** @return bool|int|string|array|null */
    public function getAttribute(int $attribute) {}

    /** @return array */
    public static function getAvailableDrivers() {}

    /** @return bool */
    public function inTransaction() {}

    /** @return string|false */
    public function lastInsertId(?string $name = null) {}

    /** @return PDOStatement|false */
    public function prepare(string $query, array $options = []) {}

    /** @return PDOStatement|false */
    public function query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs) {}

    /** @return string|false */
    public function quote(string $string, int $type = PDO::PARAM_STR) {}

    /** @return bool */
    public function rollBack() {}

    /**
     * @param array|int $value
     * @return bool
     */
    public function setAttribute(int $attribute, $value) {}
}