| @@ 120-133 (lines=14) @@ | ||
| 117 | * @return ExtendedTick |
|
| 118 | * @throws TickDoesNotExistException |
|
| 119 | */ |
|
| 120 | public function getTickById($id) { |
|
| 121 | $qb = $this->getTickSelectSql(); |
|
| 122 | $this->limitToId($qb, $id); |
|
| 123 | ||
| 124 | $cursor = $qb->execute(); |
|
| 125 | $data = $cursor->fetch(); |
|
| 126 | $cursor->closeCursor(); |
|
| 127 | ||
| 128 | if ($data === false) { |
|
| 129 | throw new TickDoesNotExistException($this->l10n->t('Tick not found')); |
|
| 130 | } |
|
| 131 | ||
| 132 | return $this->parseTickSelectSql($data); |
|
| 133 | } |
|
| 134 | ||
| 135 | ||
| 136 | /** |
|
| @@ 157-171 (lines=15) @@ | ||
| 154 | * @return ExtendedIndex |
|
| 155 | * @throws IndexDoesNotExistException |
|
| 156 | */ |
|
| 157 | public function getIndex($providerId, $documentId) { |
|
| 158 | $qb = $this->getIndexesSelectSql(); |
|
| 159 | $this->limitToProviderId($qb, $providerId); |
|
| 160 | $this->limitToDocumentId($qb, $documentId); |
|
| 161 | ||
| 162 | $cursor = $qb->execute(); |
|
| 163 | $data = $cursor->fetch(); |
|
| 164 | $cursor->closeCursor(); |
|
| 165 | ||
| 166 | if ($data === false) { |
|
| 167 | throw new IndexDoesNotExistException($this->l10n->t('Index not found')); |
|
| 168 | } |
|
| 169 | ||
| 170 | return $this->parseIndexesSelectSql($data); |
|
| 171 | } |
|
| 172 | ||
| 173 | ||
| 174 | /** |
|