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 */ |
||
86 | |||
87 | /** |
||
88 | * Throw exception if not select query |
||
89 | * |
||
90 | * @throws RuntimeException if not a select query |
||
91 | * @access protected |
||
92 | */ |
||
93 | protected function exceptionIfNotSelect() |
||
102 | |||
103 | /** |
||
104 | * Throw exception if fetched already |
||
105 | * |
||
106 | * @throws RuntimeException if fetched already |
||
107 | * @access protected |
||
108 | */ |
||
109 | protected function exceptionIfFetchedAlready() |
||
118 | |||
119 | /** |
||
120 | * Driver fetch all |
||
121 | * |
||
122 | * @return array |
||
123 | * @access protected |
||
124 | */ |
||
125 | abstract protected function realFetchAll()/*# : array */; |
||
126 | |||
127 | /** |
||
128 | * Driver fetch row |
||
129 | * |
||
130 | * @param int $rowCount number of rows to fetch |
||
131 | * @return array |
||
132 | * @access protected |
||
133 | */ |
||
134 | abstract protected function realFetchRow($rowCount)/*# : array */; |
||
135 | } |
||
136 |