setlocale(LC_TIME, $this->config->locale);
$parser = $this->loadParameters();
- $this->parseParameters($parser);
+ $res = $this->parseParameters($parser);
+ $this->handleCommands($res);
if (!$this->config->cfgFileExists) {
- throw new \Exception('No config file found');
+ throw new \Exception(
+ "No config file found. Looked at the following places:\n"
+ . '- ' . implode ("\n- ", $this->config->cfgFiles)
+ );
}
$source = $this->config->loadSource();
$this->config->renderer = $result->options['renderer'];
$this->config->stopOnEmpty = $result->options['stopOnEmpty'];
$this->config->setDate($result->options['date']);
+ return $result;
} catch (\Exception $exc) {
$this->preRenderParameterError();
$parser->displayError($exc->getMessage());
return new $class();
}
+ protected function handleCommands($res)
+ {
+ }
+
protected function preRenderParameterError()
{
}