public function fetchAll(&$resultVar, $keyField = null, $grouped = false, $useMaster = false, $method = null)
{
if ($useMaster) {
$sth =& self::$msth;
} else {
$sth =& $this->sth;
}
if (!is_object($sth)) {
$this->errorCode = 'n/a';
$this->errorMsg = 'Statement handle is not an object.';
return -1;
}
if (is_null($method)) {
$method = \PDO::FETCH_ASSOC;
}
$resultVar = array();
if (is_null($keyField)) {
$st = round(microtime(true), 3);
$resultVar = $sth->fetchAll($method);
} elseif ($grouped) {
while ($row = $sth->fetch($method)) {
$resultVar[$row[$keyField]][] = $row;
}
} else {
while ($row = $sth->fetch($method)) {
$resultVar[$row[$keyField]] = $row;
}
}
return 1;
}