1 | <?php |
||
5 | class Builder |
||
6 | { |
||
7 | public $menu = []; |
||
8 | |||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | private $filters; |
||
13 | |||
14 | 1 | public function __construct(array $filters = []) |
|
18 | |||
19 | 1 | public function add() |
|
20 | { |
||
21 | 1 | $items = $this->transformItems(func_get_args()); |
|
22 | |||
23 | 1 | foreach ($items as $item) { |
|
24 | 1 | array_push($this->menu, $item); |
|
25 | 1 | } |
|
26 | 1 | } |
|
27 | |||
28 | 1 | public function transformItems($items) |
|
32 | |||
33 | 1 | protected function applyFilters($item) |
|
49 | } |
||
50 |