1: <?php
2:
3: /**
4: * Copyright 2015 AutEne.com.
5: *
6: * This work is licensed under the
7: * Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
8: * To view a copy of this license, visit
9: *
10: * http://creativecommons.org/licenses/by-nc-nd/3.0/
11: *
12: * or send a letter to Creative Commons, 444 Castro Street, Suite 900,
13: * Mountain View, California, 94041, USA.
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: */
20:
21: /**
22: * Description of Historial
23: *
24: * La clase Historial.php gestiona las propiedades de los cálculos realizados.
25: * Las propiedades $usu, $ed, $prov, $pmp_min, $pmp_max, $panel, $paneles se
26: * obtienen de una consulta a la base de datos, donde instanciamos un objeto
27: * Historial por cada fila $row de la tabla aut_use_cal. El constructor de la
28: * clase toma como parametros de entrada la fila $row para instanciar cada objeto.
29: *
30: * @author antonio horrillo horrillo
31: */
32: class Historial {
33:
34: ////////////////////////////////////////////////////////////////////////////////
35: // Propiedades de Historial
36: ////////////////////////////////////////////////////////////////////////////////
37:
38: protected $usu;
39: protected $ed;
40: protected $prov;
41: protected $pmp_min;
42: protected $pmp_max;
43: protected $panel;
44: protected $paneles;
45:
46: ////////////////////////////////////////////////////////////////////////////////
47: // Métodos Get
48: ////////////////////////////////////////////////////////////////////////////////
49:
50: public function getUsu() {
51: return $this->usu;
52: }
53:
54: public function getEd() {
55: return $this->ed;
56: }
57:
58: public function getProv() {
59: return $this->prov;
60: }
61:
62: public function getPmp_min() {
63: return $this->pmp_min;
64: }
65:
66: public function getPmp_max() {
67: return $this->pmp_max;
68: }
69:
70: public function getPanel() {
71: return $this->panel;
72: }
73:
74: public function getPaneles() {
75: return $this->paneles;
76: }
77:
78: ////////////////////////////////////////////////////////////////////////////////
79: // Métodos Set
80: ////////////////////////////////////////////////////////////////////////////////
81:
82: public function setUsu($usu) {
83: $this->usu=$usu;
84: }
85:
86: public function setEd($ed) {
87: $this->ed=$ed;
88: }
89:
90: public function setProv($prov) {
91: $this->prov=$prov;
92: }
93:
94: public function setPmp_min($pmp_min) {
95: $this->pmp_min=$pmp_min;
96: }
97:
98: public function setPmp_max($pmp_max) {
99: $this->pmp_max=$pmp_max;
100: }
101:
102: public function setPanel($panel) {
103: $this->panel=$panel;
104: }
105:
106: public function setPaneles($paneles) {
107: $this->paneles=$paneles;
108: }
109:
110: ////////////////////////////////////////////////////////////////////////////////
111: // Constructor de Clase Historial
112: ////////////////////////////////////////////////////////////////////////////////
113:
114: public function __construct($row) {
115: $this->usu = $row['Usuario'];
116: $this->ed = $row['Ed'];
117: $this->prov = $row['Provincia'];
118: $this->pmp_min = $row['Pmpmin'];
119: $this->pmp_max = $row['Pmpmax'];
120: $this->panel = $row['Panel'];
121: $this->paneles = $row['Modulos'];
122: }
123: }
124: