/**
* Retrieve the results of the query. Typically an array of
* individual data rows, which can be either an 'array', an
* 'object', or a custom class name.
*
* @param string $type The row type. Either 'array', 'object', or a class name to use
*/
public function getResult(string
$type = 'object'
): array
{ if ($type === 'array'
) { return $this->
getResultArray();
} if ($type === 'object'
) { return $this->
getResultObject();
} return $this->
getCustomResultObject($type);
} /**
* Returns the results as an array of custom objects.
*
* @phpstan-param class-string $className
*
* @return array
*/