/** * merge_custom_config * * Merge a custom configuration array into our own array configuration * * @param array $config_array The configuration array to merge in * @access public * @return void */ public function merge_custom_config(array $config_array) { // Merge, set, and return our config return $this->config = Util::array_merge_recursive_distinct($this->config, $config_array); }
/** * process_template * * Process an entire array/object as a template * * @param mixed $unprocessed_data The array/object to run through our template processor * @access public * @return array */ public function process_template($unprocessed_data) { // Copy array for the processed data $processed_data = (array) Util::object_to_array($unprocessed_data); // Let's walk through each item, recursively array_walk_recursive($processed_data, function (&$raw) { // If its a string if (is_string($raw)) { // Parse our string $raw = $this->parse($raw); } }); return $processed_data; }