Lines Matching defs:result
54 $result = $hlp->executeQuery($qdata['codeblocks']['_'], $qdata['macros']['dsn'] ?? null);
60 if (count($result) === 1 && isset($result[0]['status']) && isset($qdata['codeblocks'][$result[0]['status']])) {
61 $this->renderStatus($result, $qdata['codeblocks'][$result[0]['status']], $renderer);
63 $this->renderTransposedResultTable($result, $renderer);
65 $this->renderResultTable($result, $renderer);
72 * Render given result via the given status HTML
74 * @param string[][] $result
78 public function renderStatus($result, $html, Doku_Renderer $R)
80 $value = $result[0]['result'] ?? '';
81 $html = str_replace(':result', hsc($value), $html);
86 * Render the given result as a table
88 * @param string[][] $result
91 public function renderResultTable($result, Doku_Renderer $R)
95 if (!count($result)) {
103 foreach (array_keys($result[0]) as $header) {
112 foreach ($result as $row) {
126 * Render the given result as a table, but turned 90 degrees
128 * @param string[][] $result
131 public function renderTransposedResultTable($result, Doku_Renderer $R)
135 if (!count($result)) {
140 $width = count($result[0]);
141 $height = count($result);
147 $R->cdata(array_keys($result[0])[$x]);
152 $this->cellFormat(array_values($result[$y])[$x], $R);