/** * Return formatted request parameters * * @since 1.9 * * @return ObjectDictionary */ protected function formatAskArgs() { $result = new SimpleDictionary(); // Set defaults $result->set('conditions', array()); $result->set('printouts', array()); $result->set('parameters', array()); if (isset($this->requestParameters['parameters']) && is_array($this->requestParameters['parameters'])) { $result->set('parameters', $this->formatParameters()); } if (isset($this->requestParameters['conditions']) && is_array($this->requestParameters['conditions'])) { $result->set('conditions', implode(' ', array_map('self::formatConditions', $this->requestParameters['conditions']))); } if (isset($this->requestParameters['printouts']) && is_array($this->requestParameters['printouts'])) { $result->set('printouts', array_map('self::formatPrintouts', $this->requestParameters['printouts'])); } return $result; }
/** * @since 1.9 * * @param $config */ protected function setupConfiguration($config) { $configuration = new SimpleDictionary($config); if ($this->configuration instanceof SimpleDictionary) { return $this->configuration->merge($configuration->toArray()); } $this->configuration = $configuration; }