3f29c99d84123e9f32dfbdae0599c369a62414a5
[kivitendo-erp.git] / SL / ShopConnector / ALL.pm
1 package SL::ShopConnector::ALL;
2
3 use strict;
4
5 use SL::ShopConnector::Shopware;
6 use SL::ShopConnector::WooCommerce;
7
8 my %shop_connector_by_name = (
9   shopware    => 'SL::ShopConnector::Shopware',
10   woocommerce    => 'SL::ShopConnector::WooCommerce',
11 );
12
13 my %shop_connector_by_connector = (
14   shopware   => 'SL::ShopConnector::Shopware',
15   woocommerce => 'SL::ShopConnector::WooCommerce',
16 );
17
18 my @shop_connector_order = qw(
19   woocommerce
20   shopware
21 );
22
23 my @shop_connectors = (
24   { id => "shopware",   description => "Shopware" },
25   { id => "woocommerce",   description => "WooCommerce" },
26 );
27
28
29 sub all_shop_connectors {
30   map { $shop_connector_by_name{$_} } @shop_connector_order;
31 }
32
33 sub shop_connector_class_by_name {
34   $shop_connector_by_name{$_[1]};
35 }
36
37 sub shop_connector_class_by_connector {
38   $shop_connector_by_connector{$_[1]};
39 }
40
41 sub connectors {
42   \@shop_connectors;
43 }
44 1;