1 | <?php |
||
8 | class Result |
||
9 | { |
||
10 | const FETCH_ASSOC = 1; |
||
11 | const FETCH_NUM = 2; |
||
12 | const FETCH_BOTH = 3; |
||
13 | const FETCH_OBJ = PDO::FETCH_OBJ; |
||
14 | |||
15 | /** |
||
16 | * @var Connection |
||
17 | */ |
||
18 | protected $connection; |
||
19 | |||
20 | /** |
||
21 | * @var PDOStatement |
||
22 | */ |
||
23 | protected $statement; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | protected $cursor; |
||
29 | |||
30 | protected $lastFetch; |
||
31 | |||
32 | public function __construct(PDOStatement $statement, Connection $connection) |
||
37 | |||
38 | /** |
||
39 | * Get the PDO statement. |
||
40 | * |
||
41 | * @return PDOStatement |
||
42 | */ |
||
43 | public function getStatement() |
||
47 | |||
48 | public function toArray() |
||
52 | |||
53 | public function count() |
||
57 | |||
58 | public function column($column, $row) |
||
64 | |||
65 | public function fetch($style = self::FETCH_BOTH, $orientation = PDO::FETCH_ORI_NEXT, $offset = 0) |
||
80 | |||
81 | public function fetchObject($class = 'stdClass', array $params = []) |
||
91 | |||
92 | public function free() |
||
96 | |||
97 | public function convertFetchStyle($style) |
||
116 | |||
117 | public function setCursor($rowNumber) |
||
121 | |||
122 | public function getColumnMeta($columnNumber) |
||
126 | |||
127 | public function getColumnCount() |
||
131 | |||
132 | public function getConnection() |
||
136 | |||
137 | public function getLastFetch() |
||
141 | } |
||
142 |