Highway to PSR2
[openemr.git] / interface / super / rules / library / ReminderIntervalType.php
blob1a808b8f891015814399d441d73aae2244c2f607
1 <?php
2 // Copyright (C) 2010-2011 Aron Racho <aron@mi-squred.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 /**
10 * enum
11 * @author aron
13 class ReminderIntervalType
16 var $code;
17 var $lbl;
19 function __construct($code, $lbl)
21 $this->lbl = $lbl;
22 $this->code = $code;
25 /**
27 * @param string $value
28 * @return ReminderIntervalType
30 public static function from($code)
32 $map = self::map();
33 return $map[$code];
36 public static function values()
38 $map = self::map();
39 return array_values($map);
42 private static function map()
44 $map = array(
45 'clinical' => new ReminderIntervalType('clinical', xl('Clinical')),
46 'patient' => new ReminderIntervalType('patient', xl('Patient'))
48 return $map;