~oh-dev/openhealth/phit-tools

« back to all changes in this revision

Viewing changes to ihris-suite/lib/ihris-manage/lib/iHRIS_Benefit.php

  • Committer: litlfred at ibiblio
  • Date: 2009-10-23 12:59:28 UTC
  • Revision ID: litlfred@ibiblio.org-20091023125928-u5lkafz0urm9t8eq
updated ihris-suite to 4.0.1-prerelease -- not debugged

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/*
3
 
 * © Copyright 2007, 2008 IntraHealth International, Inc.
4
 
 * 
5
 
 * This File is part of iHRIS
6
 
 * 
7
 
 * iHRIS is free software; you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation; either version 3 of the License, or
10
 
 * (at your option) any later version.
11
 
 * 
12
 
 * This program is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 * 
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 
 */
20
 
/**
21
 
 * @package iHRIS
22
 
 * @subpackage Manage
23
 
 * @author Luke Duncan <lduncan@intrahealth.org>
24
 
 * @copyright Copyright &copy; 2007, 2008 IntraHealth International, Inc. 
25
 
 * @since v1.0.0
26
 
 * @version v2.0.0
27
 
 */
28
 
/**
29
 
 * Object for dealing with benefits for people.
30
 
 * 
31
 
 * @package iHRIS
32
 
 * @subpackage Manage
33
 
 * @access public
34
 
 */
35
 
class iHRIS_Benefit extends I2CE_Form {
36
 
 
37
 
    const RECURRENCE_ONCE = 1;
38
 
    const RECURRENCE_WEEKLY = 2;
39
 
    const RECURRENCE_MONTHLY = 3;
40
 
    const RECURRENCE_YEARLY = 4;
41
 
 
42
 
    /**
43
 
     * @var array $recurrence The possible values for recurrence for benefits.
44
 
     */
45
 
    private static $recurrence = array(
46
 
        self::RECURRENCE_ONCE => 'Once',
47
 
        self::RECURRENCE_WEEKLY => 'Weekly',
48
 
        self::RECURRENCE_MONTHLY => 'Monthly',
49
 
        self::RECURRENCE_YEARLY => 'Yearly',
50
 
        );
51
 
 
52
 
    /**
53
 
     * Lookup the given value from the recurrence array.
54
 
     * @param integer $id
55
 
     * @param string $form Not used for this method.
56
 
     * @return string
57
 
     */
58
 
    static public function lookupRecurrence( $id, $form="" ) {
59
 
        return I2CE_Form::lookupArray( $id, self::$recurrence );
60
 
    }
61
 
    /**
62
 
     * List all the options from the recurrence array.
63
 
     * @param string $form The  form we wish to lookup by
64
 
     * @returns array
65
 
     */
66
 
    static public function listRecurrenceOptions($form) {
67
 
        return  self::$recurrence ;
68
 
    }
69
 
         
70
 
}
71
 
 
72
 
# Local Variables:
73
 
# mode: php
74
 
# c-default-style: "bsd"
75
 
# indent-tabs-mode: nil
76
 
# c-basic-offset: 4
77
 
# End: