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 Periodo
23: *
24: * La clase Periodo.php gestiona las propiedades del Periodo de Cálculo.
25: * Las propiedades $periodo, $k y $f se obtienen de una consulta a la base de
26: * datos, donde instanciamos un objeto Periodo por cada fila $row de la tabla
27: * aut_per_cal. El constructor de la clase toma como parametros de entrada la
28: * fila $row para instanciar cada objeto.
29: *
30: * @author antonio horrillo horrillo
31: */
32: class Periodo {
33:
34: ////////////////////////////////////////////////////////////////////////////////
35: // Propiedades de Periodo
36: ////////////////////////////////////////////////////////////////////////////////
37:
38: protected $periodo;
39: protected $k;
40: protected $f;
41:
42: ////////////////////////////////////////////////////////////////////////////////
43: // Métodos Get
44: ////////////////////////////////////////////////////////////////////////////////
45:
46: public function getPeriodo() {
47: return $this->periodo;
48: }
49:
50: public function setPeriodo($periodo) {
51: $this->provincia=$periodo;
52: }
53:
54: public function getK() {
55: return $this->k;
56: }
57:
58: ////////////////////////////////////////////////////////////////////////////////
59: // Métodos Set
60: ////////////////////////////////////////////////////////////////////////////////
61:
62: public function setK($k) {
63: $this->k=$k;
64: }
65:
66: public function getF() {
67: return $this->f;
68: }
69:
70: public function setF($f) {
71: $this->f=$f;
72: }
73:
74: ////////////////////////////////////////////////////////////////////////////////
75: // Constructor de Clase Periodo
76: ////////////////////////////////////////////////////////////////////////////////
77:
78: public function __construct($row) {
79: $this->periodo = $row['Periodo'];
80: $this->k = $row['K'];
81: $this->f = $row['F'];
82: }
83: }