Bug 26265: (QA follow-up) Remove g option from regex, add few dirs
[koha-equinox.git] / Koha / StockRotationStages.pm
1 package Koha::StockRotationStages;
2
3 # Copyright PTFS Europe 2016
4 #
5 # This file is part of Koha.
6 #
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 3 of the License, or (at your option) any later
10 # version.
11 #
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20 use Modern::Perl;
21
22 use Koha::Database;
23 use Koha::StockRotationStage;
24
25 use base qw(Koha::Objects);
26
27 =head1 NAME
28
29 StockRotationStages - Koha StockRotationStages Object class
30
31 =head1 SYNOPSIS
32
33 StockRotationStages class used primarily by stockrotation .pls and the stock
34 rotation cron script.
35
36 =head1 DESCRIPTION
37
38 Standard Koha::Objects definitions, and additional methods.
39
40 =head1 API
41
42 =head2 Class Methods
43
44 =cut
45
46 =head3 investigate
47
48   my $report = $stages->investigate($rota_so_far);
49
50 Return a report detailing the current status and required actions for all
51 relevant items spread over the set of stages.
52
53 For details of intent and context of this procedure, please see
54 Koha::StockRotationRota->investigate.
55
56 =cut
57
58 sub investigate {
59     my ( $self, $report ) = @_;
60
61     while ( my $stage = $self->next ) {
62         $report = $stage->investigate($report);
63     }
64
65     return $report;
66 }
67
68 =head3 _type
69
70 =cut
71
72 sub _type {
73     return 'Stockrotationstage';
74 }
75
76 =head3 object_class
77
78 =cut
79
80 sub object_class {
81     return 'Koha::StockRotationStage';
82 }
83
84 1;
85
86 =head1 AUTHOR
87
88 Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
89
90 =cut