pdo_dbh.stub.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /** @generate-class-entries */
  3. /** @not-serializable */
  4. class PDO
  5. {
  6. public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null) {}
  7. /** @tentative-return-type */
  8. public function beginTransaction(): bool {}
  9. /** @tentative-return-type */
  10. public function commit(): bool {}
  11. /** @tentative-return-type */
  12. public function errorCode(): ?string {}
  13. /** @tentative-return-type */
  14. public function errorInfo(): array {}
  15. /** @tentative-return-type */
  16. public function exec(string $statement): int|false {}
  17. /** @tentative-return-type */
  18. public function getAttribute(int $attribute): mixed {}
  19. /** @tentative-return-type */
  20. public static function getAvailableDrivers(): array {}
  21. /** @tentative-return-type */
  22. public function inTransaction(): bool {}
  23. /** @tentative-return-type */
  24. public function lastInsertId(?string $name = null): string|false {}
  25. /** @tentative-return-type */
  26. public function prepare(string $query, array $options = []): PDOStatement|false {}
  27. /** @tentative-return-type */
  28. public function query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): PDOStatement|false {}
  29. /** @tentative-return-type */
  30. public function quote(string $string, int $type = PDO::PARAM_STR): string|false {}
  31. /** @tentative-return-type */
  32. public function rollBack(): bool {}
  33. /** @tentative-return-type */
  34. public function setAttribute(int $attribute, mixed $value): bool {}
  35. }