- // do something with the result object
- $this->config->daysNext = $result->options['daysNext'];
- $this->config->daysPrev = $result->options['daysPrev'];
- $this->config->renderer = $result->options['renderer'];
- $this->config->quiet = $result->options['quiet'];
+
+ if ($result->options['configfile'] !== null) {
+ $this->config->cfgFiles = array($result->options['configfile']);
+ }
+
+ $this->config->daysNext = $result->options['daysNext'];
+ $this->config->daysPrev = $result->options['daysPrev'];
+ $this->config->renderer = $result->options['renderer'];
+ $this->config->stopOnEmpty = $result->options['stopOnEmpty'];
+ $this->config->setDate($result->options['date']);
+ if (isset($result->options['ansi'])) {
+ $this->config->ansi = $result->options['ansi'];
+ }
+ return $result;