public function __construct($queryResultClass, $queryResultType)
{
if (!class_exists($queryResultClass)) {
throw new \RuntimeException(sprintf('The class "%s" could not be found', $queryResultClass));
}
$this->queryResultClass = $queryResultClass;
if ($queryResultType !== self::RESULT_SINGLE && $queryResultType !== self::RESULT_MULTIPLE) {
throw new \RuntimeException(sprintf('Query Result Type should be of type "%s" or "%s", "%s" given', self::RESULT_SINGLE, self::RESULT_MULTIPLE, (string) $queryResultType));
}
$this->queryResultType = $queryResultType;
}