| 1 | <?php |
||
| 11 | class Model |
||
| 12 | { |
||
| 13 | private $prop1; |
||
| 14 | private $prop2; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Model constructor. |
||
| 18 | * |
||
| 19 | * @param $prop1 |
||
| 20 | * @param $prop2 |
||
| 21 | */ |
||
| 22 | public function __construct($prop1, $prop2) |
||
| 23 | { |
||
| 24 | $this->prop1 = $prop1; |
||
| 25 | $this->prop2 = $prop2; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return mixed |
||
| 30 | */ |
||
| 31 | public function getProp1() |
||
| 32 | { |
||
| 33 | return $this->prop1; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param mixed $prop1 |
||
| 38 | */ |
||
| 39 | public function setProp1($prop1) |
||
| 40 | { |
||
| 41 | $this->prop1 = $prop1; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return mixed |
||
| 46 | */ |
||
| 47 | public function getProp2() |
||
| 48 | { |
||
| 49 | return $this->prop2; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param mixed $prop2 |
||
| 54 | */ |
||
| 55 | public function setProp2($prop2) |
||
| 56 | { |
||
| 57 | $this->prop2 = $prop2; |
||
| 58 | } |
||
| 59 | |||
| 60 | public function sum() |
||
| 61 | { |
||
| 62 | return $this->prop1 + $this->prop2; |
||
| 63 | } |
||
| 64 | } |
||
| 65 |