| 1 |
<?php |
| 2 |
|
| 3 |
namespace WordPress\Reprint\Server; |
| 4 |
|
| 5 |
/** |
| 6 |
* Provides PDO constants needed by adapters which also run without ext-pdo. |
| 7 |
*/ |
| 8 |
class PdoConstants { |
| 9 |
public static function fetch_assoc(): int |
| 10 |
{ |
| 11 |
return defined('PDO::FETCH_ASSOC') ? constant('PDO::FETCH_ASSOC') : 2; |
| 12 |
} |
| 13 |
|
| 14 |
public static function fetch_column(): int |
| 15 |
{ |
| 16 |
return defined('PDO::FETCH_COLUMN') ? constant('PDO::FETCH_COLUMN') : 7; |
| 17 |
} |
| 18 |
|
| 19 |
public static function param_str(): int |
| 20 |
{ |
| 21 |
return defined('PDO::PARAM_STR') ? constant('PDO::PARAM_STR') : 2; |
| 22 |
} |
| 23 |
} |
| 24 |
|