/** * @param RateRequest|null $request * @return mixed|null */ public function getConfig(RateRequest $request = null) { if ($this->isDebugEnabled()) { $this->debugLogger->collapseOpen("Carrier[{$this->_code}].getConfig", 'panel-primary'); } $config = null; try { $this->registryHelper->init($this, $request); $configString = $this->getConfigData('config'); $config = $this->configHelper->parse($configString, $this->registryHelper, (bool) $this->getConfigData('debug')); } catch (\Exception $e) { $this->_logger->debug($e); if ($this->isDebugEnabled()) { $this->debugLogger->debug("Carrier[{$this->_code}].getConfig - Error - " . $e->getMessage()); } } if ($this->isDebugEnabled()) { $this->debugLogger->collapseClose(); } return $config; }
/** * @param mixed $node * @param string $msg * @param string $panel */ protected function addDebug($node, $msg, $panel = 'panel-default') { $title = $this->evaluator->prettyPrint($node); $this->debugLogger->collapse("<pre class=php>" . htmlspecialchars($title) . "</pre>", $msg, $panel); }