1 | <?php |
||
13 | class ColumnCollection extends Collection { |
||
14 | |||
15 | /** @var Model */ |
||
16 | private $_model; |
||
17 | |||
18 | /** |
||
19 | * Create a new collection of columns. |
||
20 | * |
||
21 | * @param mixed $items |
||
22 | * @param Model $model |
||
23 | */ |
||
24 | 70 | public function __construct($items = [], Model $model) |
|
30 | |||
31 | /** |
||
32 | * Returns an array of Column objects which may be bound to a formatter. |
||
33 | * |
||
34 | * @param array $columns |
||
35 | * @return array |
||
36 | */ |
||
37 | 70 | private function _fetchColumns(array $columns) : array |
|
48 | |||
49 | /** |
||
50 | * @param string|int $column |
||
51 | * @param $formatter |
||
52 | * @return array |
||
53 | */ |
||
54 | 57 | private function _setColumnFormatter($column, $formatter) : array |
|
64 | |||
65 | /** |
||
66 | * Push a column onto the end of the collection. |
||
67 | * |
||
68 | * @param mixed $value |
||
69 | * @return ColumnCollection |
||
70 | */ |
||
71 | 2 | public function push($value) : ColumnCollection |
|
77 | |||
78 | /** |
||
79 | * @return array |
||
80 | */ |
||
81 | 51 | public function getUnmutatedColumns() : array |
|
88 | |||
89 | /** |
||
90 | * @return array |
||
91 | */ |
||
92 | 46 | public function getHeaders() : array |
|
102 | } |
If you place a parameter with a default value before a parameter with a default value, the default value of the first parameter will never be used as it will always need to be passed anyway: