1 | <?php |
||
17 | class PDOResult extends PDOStatement |
||
18 | { |
||
19 | /** |
||
20 | * Limits after which no records will be dumped in __debugInfo. |
||
21 | */ |
||
22 | const DUMP_LIMIT = 500; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private $parameters = []; |
||
28 | |||
29 | /** |
||
30 | * @param array $parameters |
||
31 | */ |
||
32 | protected function __construct(array $parameters) |
||
36 | |||
37 | /** |
||
38 | * Bind a column value to a PHP variable. Aliased to bindParam. |
||
39 | * |
||
40 | * @param int|string $columnID Column number (0 - first column) |
||
41 | * @param mixed $variable |
||
42 | * |
||
43 | * @return self|$this |
||
44 | */ |
||
45 | public function bind($columnID, &$variable): PDOResult |
||
56 | |||
57 | /** |
||
58 | * Just an alias. |
||
59 | * |
||
60 | * @return int |
||
61 | */ |
||
62 | public function countColumns(): int |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function queryString(): string |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | * |
||
78 | * Attention, this method will return 0 for SQLite databases. |
||
79 | * |
||
80 | * @link http://php.net/manual/en/pdostatement.rowcount.php |
||
81 | * @link http://stackoverflow.com/questions/15003232/pdo-returns-wrong-rowcount-after-select-statement |
||
82 | * |
||
83 | * @return int |
||
84 | */ |
||
85 | public function count(): int |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function close() |
||
97 | |||
98 | /** |
||
99 | * @return array |
||
100 | */ |
||
101 | public function toArray(): array |
||
102 | { |
||
103 | return $this->fetchAll(\PDO::FETCH_ASSOC); |
||
104 | } |
||
105 | |||
106 | /** |
||
107 | * @return array |
||
108 | */ |
||
109 | public function __debugInfo() |
||
117 | } |
||
118 |