* @link http://www.oxidmodule.com */ namespace D3\DataWizard\Application\Model\ExportRenderer; class RendererBridge { const FORMAT_CSV = 'CSV'; const FORMAT_PRETTY = 'Pretty'; /** * @param string $format * * @return RendererInterface */ public function getRenderer($format = self::FORMAT_CSV): RendererInterface { switch ($format) { case self::FORMAT_PRETTY: return oxNew(Pretty::class); case self::FORMAT_CSV: default: return oxNew(Csv::class); } } }