| Total Complexity | 8 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace FlatPlan\Components; |
||
| 3 | class Structure extends AbstractComponent { |
||
| 4 | |||
| 5 | protected $components; |
||
| 6 | |||
| 7 | protected $roles = ['aside', 'chapter', 'container', 'divider', 'header']; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @param string $role |
||
| 11 | * @return void |
||
| 12 | */ |
||
| 13 | public function __construct($role) |
||
| 16 | } |
||
| 17 | |||
| 18 | public function setComponents($components) |
||
| 19 | { |
||
| 20 | if (is_array($components)) { |
||
| 21 | foreach ($components as $component) { |
||
| 22 | if ($component instanceof AbstractComponent) { |
||
| 23 | array_push($this->components, $component); |
||
| 24 | } |
||
| 25 | } |
||
| 26 | } else if ($components instanceof AbstractComponent) { |
||
| 27 | array_push($this->components, $components); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | private function getComponents() |
||
| 32 | { |
||
| 33 | return $this->components; |
||
| 34 | } |
||
| 35 | |||
| 36 | protected function getComponent() |
||
| 42 | } |
||
| 43 | } |
||
| 44 |