MCPcopy Create free account
hub / github.com/Rello/analytics / read

Method read

lib/Db/ReportMapper.php:170–188  ·  view source on GitHub ↗

* get single report * @param int $id * @return array * @throws Exception */

(int $id)

Source from the content-addressed store, hash-verified

168 * @throws Exception
169 */
170 public function read(int $id)
171 {
172 $sql = $this->db->getQueryBuilder();
173 $sql->from(self::TABLE_NAME)
174 ->select('*')
175 ->where($sql->expr()->eq('id', $sql->createNamedParameter($id)));
176 $statement = $sql->executeQuery();
177 $result = $statement->fetch();
178 $statement->closeCursor();
179
180 if ($result !== false) {
181 $result['dataset'] = (int) $result['dataset'];
182 $result['type'] = (int) $result['type'];
183 $result['parent'] = (int) $result['parent'];
184 $result['refresh'] = (int) $result['refresh'];
185 }
186
187 return $result;
188 }
189
190 /**
191 * update report

Calls

no outgoing calls