Skip to content

Commit c5bcf75

Browse files
committed
Add stub for PDO
1 parent 170ed1f commit c5bcf75

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

ext/pdo/pdo.stub.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
function pdo_drivers(): array {}
4+
5+
class PDO {
6+
public function __construct(string dsn, string username = "", string passwd = "", array options = []) {}
7+
8+
public function beginTransaction(): bool {}
9+
10+
public function commit(): bool {}
11+
12+
public function errorCode(): string {}
13+
14+
public function errorInfo(): array {}
15+
16+
public function exec(string $statement): int {}
17+
18+
public function getAttribute(int $attribute): mixed {}
19+
20+
public static function getAvailableDrivers(): array {}
21+
22+
public function inTransaction(): bool {}
23+
24+
public function lastInsertId(?string $name = NULL): string {}
25+
26+
public function prepare(string $statement, array $driver_options = []): PDOStatement {}
27+
28+
public function query(string $statement): PDOStatement {}
29+
30+
public function quote(string $string, int $parameter_type = PDO::PARAM_STR): string {}
31+
32+
public function rollBack(): bool {}
33+
34+
public function setAttribute (int $attribute, mixed $value) : bool {}
35+
}

0 commit comments

Comments
 (0)