Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e01550a6

Von Werner Hahn vor mehr als 7 Jahren hinzugefügt

  • ID e01550a6900d0a126f1f40d56a09345f5b23dd27
  • Vorgänger 5a7d0c52
  • Nachfolger 856a3b09

WebshopApi: ShopConnector Base und ALL

Unterschiede anzeigen:

SL/ShopConnector/ALL.pm
1
package SL::ShopConnector::ALL;
2

  
3
use strict;
4

  
5
my %shop_connector_by_name = (
6
);
7

  
8
my %shop_connector_by_connector = (
9
);
10

  
11
my @shop_connector_order = qw(
12
  shopware
13
);
14

  
15
my @shop_connectors = (
16
);
17

  
18

  
19
sub all_shop_connectors {
20
  map { $shop_connector_by_name{$_} } @shop_connector_order;
21
}
22

  
23
sub shop_connector_class_by_name {
24
  $shop_connector_by_name{$_[1]};
25
}
26

  
27
sub shop_connector_class_by_connector {
28
  $shop_connector_by_connector{$_[1]};
29
}
30

  
31
sub connectors {
32
  \@shop_connectors;
33
}
34
1;
SL/ShopConnector/Base.pm
1
package SL::ShopConnector::Base;
2

  
3
use strict;
4

  
5
use parent qw(SL::DB::Object);
6
use Rose::Object::MakeMethods::Generic (
7
  scalar => [ qw(config) ],
8
);
9

  
10
sub get_order      { die 'get_order needs to be implemented' }
11

  
12
sub get_new_orders { die 'get_order needs to be implemented' }
13

  
14
sub update_part    { die 'update_part needs to be implemented' }
15

  
16
sub get_article    { die 'get_article needs to be implemented' }
17

  
18
sub get_categories { die 'get_order needs to be implemented' }
19

  
20
sub get_version    { die 'get_order needs to be implemented' }
21

  
22
1;
23

  
24
__END__
25

  
26
=encoding utf-8
27

  
28
=head1 NAME
29

  
30
  SL::ShopConnectorBase - this is the base class for shop connectors
31

  
32
=head1 SYNOPSIS
33

  
34

  
35
=head1 DESCRIPTION
36

  
37
=head1 AVAILABLE METHODS
38

  
39
=over 4
40

  
41
=item C<get_order>
42

  
43
=item C<get_new_orders>
44

  
45
=item C<update_part>
46

  
47
=item C<get_article>
48

  
49
=item C<get_categories>
50

  
51
=item C<get_version>
52

  
53
=back
54

  
55
=head1 SEE ALSO
56

  
57
L<SL::ShopConnector::ALL>
58

  
59
=head1 BUGS
60

  
61
None yet. :)
62

  
63
=head1 AUTHOR
64

  
65
G. Richardson <lt>information@kivitendo-premium.deE<gt>
66
W. Hahn E<lt>wh@futureworldsearch.netE<gt>
67

  
68
=cut

Auch abrufbar als: Unified diff