aboutsummaryrefslogtreecommitdiff
path: root/src/bdrem/UserInterface.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/bdrem/UserInterface.php')
-rw-r--r--src/bdrem/UserInterface.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bdrem/UserInterface.php b/src/bdrem/UserInterface.php
index 1b8cb56..4e27d5d 100644
--- a/src/bdrem/UserInterface.php
+++ b/src/bdrem/UserInterface.php
@@ -13,7 +13,8 @@ abstract class UserInterface
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');
@@ -110,6 +111,7 @@ abstract class UserInterface
$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());
@@ -138,6 +140,10 @@ abstract class UserInterface
return new $class();
}
+ protected function handleCommands($res)
+ {
+ }
+
protected function preRenderParameterError()
{
}