Total Complexity | 6 |
Total Lines | 67 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class Statement implements StatementInterface |
||
11 | { |
||
12 | /** |
||
13 | * The query result |
||
14 | * |
||
15 | * @var SQLite3Result |
||
16 | */ |
||
17 | protected $result = null; |
||
18 | |||
19 | /** |
||
20 | * Undocumented variable |
||
21 | * |
||
22 | * @var int |
||
23 | */ |
||
24 | protected $offset = 0; |
||
25 | |||
26 | /** |
||
27 | * The constructor |
||
28 | * |
||
29 | * @param SQLite3Result $result |
||
30 | */ |
||
31 | public function __construct(SQLite3Result $result) |
||
32 | { |
||
33 | $this->result = $result; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @inheritDoc |
||
38 | */ |
||
39 | public function rowCount() |
||
40 | { |
||
41 | return $this->result->numColumns(); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @inheritDoc |
||
46 | */ |
||
47 | public function fetchAssoc() |
||
48 | { |
||
49 | return $this->result->fetchArray(SQLITE3_ASSOC); |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @inheritDoc |
||
54 | */ |
||
55 | public function fetchRow() |
||
56 | { |
||
57 | return $this->result->fetchArray(SQLITE3_NUM); |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @inheritDoc |
||
62 | */ |
||
63 | public function fetchField() |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * The destructor |
||
73 | */ |
||
74 | public function __destruct() |
||
79 |