1 | <?php |
||
13 | class MarketModels extends ObjectModel |
||
14 | { |
||
15 | /** |
||
16 | * Add model |
||
17 | * |
||
18 | * @param array|MarketModel $model |
||
19 | * @return $this |
||
20 | */ |
||
21 | 5 | public function add($model) |
|
22 | { |
||
23 | 5 | if (is_array($model)) { |
|
24 | 5 | $this->collection[] = new MarketModel($model); |
|
25 | } elseif ($model instanceof MarketModel) { |
||
26 | $this->collection[] = $model; |
||
27 | } |
||
28 | |||
29 | 5 | return $this; |
|
30 | } |
||
31 | |||
32 | /** |
||
33 | * Get models |
||
34 | * |
||
35 | * @return array |
||
36 | */ |
||
37 | public function getAll() |
||
41 | } |
||
42 |