1 | <?php /** MicroFormModel */ |
||
19 | abstract class FormModel implements IFormModel |
||
20 | { |
||
21 | /** @var array $errors validation errors */ |
||
22 | protected $errors = []; |
||
23 | |||
24 | |||
25 | /** |
||
26 | * Constructor form |
||
27 | * |
||
28 | * @access public |
||
29 | * @result void |
||
30 | */ |
||
31 | public function __construct() |
||
34 | |||
35 | /** |
||
36 | * @inheritdoc |
||
37 | */ |
||
38 | public function validate() |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | public function rules() |
||
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | public function getClient() |
||
78 | |||
79 | /** |
||
80 | * @inheritdoc |
||
81 | */ |
||
82 | public function setModelData(array $data = []) |
||
88 | |||
89 | /** |
||
90 | * @inheritdoc |
||
91 | */ |
||
92 | public function addError($description) |
||
96 | |||
97 | /** |
||
98 | * @inheritdoc |
||
99 | */ |
||
100 | public function getErrors() |
||
104 | |||
105 | /** |
||
106 | * Convert results array to single array |
||
107 | * |
||
108 | * @access protected |
||
109 | * |
||
110 | * @param array $errors merge errors |
||
111 | * |
||
112 | * @return array |
||
113 | */ |
||
114 | private function convertMultiArrayToArray($errors) |
||
127 | |||
128 | /** |
||
129 | * @inheritdoc |
||
130 | */ |
||
131 | public function getLabel($property) |
||
137 | |||
138 | /** |
||
139 | * @inheritdoc |
||
140 | */ |
||
141 | public function attributeLabels() |
||
145 | |||
146 | /** |
||
147 | * @inheritdoc |
||
148 | */ |
||
149 | public function checkAttributeExists($name) |
||
153 | } |
||
154 |