function render($engine, $engineOutput, $outputContext, $templateFile) { $engine = OIntegrate::getEngine($engine, $engineOutput); if (!($output = OIntegrate::getConverter($engineOutput, $outputContext))) { $this->errors = array(1001, 'Output converter not found.'); return; } if (!$engine) { $this->errors = array(1000, 'Engine not found'); return; } $raw = $engine->process($this->data, $templateFile); return $output->convert($raw); }