<?php
 class vB_dB_Query_Method extends vB_dB_Query { public function setQuery(array $params, array|string $sortorder) : bool { if (!method_exists($this->querydefs, $this->queryid)) { throw new vB_Exception_Assertor('invalid_query_definition_x', $this->queryid); } $method = $this->queryid; $this->params = $params; $this->data_loaded = $this->querydefs->$method($params, $this->db, true, $this->dbSlave); return $this->data_loaded; } public function execSQL() : mixed { if (!$this->data_loaded) { throw new Exception('invalid_query_parameters for ' . $this->queryid); } $method = $this->queryid; $result = $this->querydefs->$method($this->params, $this->db, false, $this->dbSlave); return $result; } } 