<?php
namespace EasyChat\Model\Cms;







class CmsFactory {

    





    public static function create($db, string $cms_type, string $cms_prefix, array $settings = []) {
        
        switch (strtolower(trim($cms_type))) {
            case 'opencart':
                return new CmsModelOpenCart($db, $cms_prefix, $settings);

            case 'wordpress':
            case 'woocommerce':
                return new CmsModelWordPress($db, $cms_prefix, $settings);

            case 'bitrix':
                return new CmsModelBitrix($db, $cms_prefix, $settings);

            case 'webasyst':
            case 'shopscript':
                return new CmsModelWebAsyst($db, $cms_prefix, $settings);

            default:
                return null;
        }
    }
}
