/** * @access public * @param array structure defines correlatio between catalog & source fields * @param string could be 'CSV' or (not implemented so far) 'DB' */ public static function createCatalogProvider($structure, $source_type) { try { switch ($source_type) { case 'CSV': return CatalogCSV::getInstance($structure); break; default: return new NullCatalog(); } } catch (Exception $e) { self::log($e->getMessage(), 'err'); } }