public function dqlCommand($depth = 3, $hydrationMode = 'array', $offset = null, $limit = null)
{
if (!$this->isDatabaseConfigured()) {
$this->outputLine('DQL query is not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');
$this->quit(1);
}
$dqlStatements = $this->request->getExceedingArguments();
$hydrationModeConstant = 'Doctrine\\ORM\\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $hydrationMode));
if (!defined($hydrationModeConstant)) {
throw new \InvalidArgumentException('Hydration mode "' . $hydrationMode . '" does not exist. It should be either: object, array, scalar or single-scalar.');
}
foreach ($dqlStatements as $dql) {
$resultSet = $this->doctrineService->runDql($dql, constant($hydrationModeConstant), $offset, $limit);
Debug::dump($resultSet, $depth);
}
}