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 Sistema
23: *
24: * La clase Sistema.php gestiona las propiedades del Los tipos de Sistema y sus
25: * eficiencias, directo, con inversor o con inversor y batería.
26: * Las propiedades $sistema y $pr se obtienen de una consulta a la base de
27: * datos, donde instanciamos un objeto Sistema por cada fila $row de la tabla
28: * aut_efi_sis. El constructor de la clase toma como parametros de entrada la
29: * fila $row para instanciar cada objeto.
30: *
31: * @author antonio horrillo horrillo
32: */
33: class Sistema {
34:
35: ////////////////////////////////////////////////////////////////////////////////
36: // Propiedades de Sistema
37: ////////////////////////////////////////////////////////////////////////////////
38:
39: protected $sistema;
40: protected $pr;
41:
42: ////////////////////////////////////////////////////////////////////////////////
43: // Métodos Get
44: ////////////////////////////////////////////////////////////////////////////////
45:
46: public function getSistema() {
47: return $this->sistema;
48: }
49:
50: public function getPr() {
51: return $this->pr;
52: }
53:
54: ////////////////////////////////////////////////////////////////////////////////
55: // Métodos Set
56: ////////////////////////////////////////////////////////////////////////////////
57:
58: public function setSistema($sistema) {
59: $this->sistema=$sistema;
60: }
61:
62: public function setPr($pr) {
63: $this->pr=$pr;
64: }
65:
66: ////////////////////////////////////////////////////////////////////////////////
67: // Constructor de Clase Periodo
68: ////////////////////////////////////////////////////////////////////////////////
69:
70: public function __construct($row) {
71: $this->sistema = $row['Sistemas'];
72: $this->pr = $row['PR'];
73: }
74: }