1 | <?php |
||
32 | abstract class ResultAbstract extends ObjectAbstract implements ResultInterface |
||
33 | { |
||
34 | /** |
||
35 | * Fetched already |
||
36 | * |
||
37 | * @var bool |
||
38 | * @access protected |
||
39 | */ |
||
40 | protected $fetched = false; |
||
41 | |||
42 | /** |
||
43 | * {@inheritDoc} |
||
44 | */ |
||
45 | public function isSelect()/*# : bool */ |
||
49 | |||
50 | /** |
||
51 | * {@inheritDoc} |
||
52 | */ |
||
53 | public function fetchAll()/*# : array */ |
||
60 | |||
61 | /** |
||
62 | * {@inheritDoc} |
||
63 | */ |
||
64 | public function fetchRow(/*# int */ $rowCount = 1)/*# : array */ |
||
71 | |||
72 | /** |
||
73 | * {@inheritDoc} |
||
74 | */ |
||
75 | public function fetchCol($col = 0, $rowCount = 0)/*# : array */ |
||
96 | |||
97 | /** |
||
98 | * Throw exception if not select query |
||
99 | * |
||
100 | * @throws RuntimeException if not a select query |
||
101 | * @access protected |
||
102 | */ |
||
103 | protected function exceptionIfNotSelect() |
||
112 | |||
113 | /** |
||
114 | * Throw exception if fetched already |
||
115 | * |
||
116 | * @throws RuntimeException if fetched already |
||
117 | * @access protected |
||
118 | */ |
||
119 | protected function exceptionIfFetchedAlready() |
||
128 | |||
129 | /** |
||
130 | * Driver fetch all |
||
131 | * |
||
132 | * @return array |
||
133 | * @access protected |
||
134 | */ |
||
135 | abstract protected function realFetchAll()/*# : array */; |
||
136 | |||
137 | /** |
||
138 | * Driver fetch row |
||
139 | * |
||
140 | * @param int $rowCount number of rows to fetch |
||
141 | * @return array |
||
142 | * @access protected |
||
143 | */ |
||
144 | abstract protected function realFetchRow($rowCount)/*# : array */; |
||
145 | } |
||
146 |