| 1 | <?php |
||
| 11 | class TabCollection implements \Countable |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var Tab[] |
||
| 16 | */ |
||
| 17 | private $tabs; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * TabCollection constructor. |
||
| 21 | * |
||
| 22 | * @param Tab[] $tabs |
||
| 23 | */ |
||
| 24 | public function __construct(array $tabs = []) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Count elements of an object |
||
| 31 | * @link http://php.net/manual/en/countable.count.php |
||
| 32 | * @return int The custom count as an integer. |
||
| 33 | * </p> |
||
| 34 | * <p> |
||
| 35 | * The return value is cast to an integer. |
||
| 36 | * @since 5.1.0 |
||
| 37 | */ |
||
| 38 | public function count() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param Tab $tab |
||
| 45 | * |
||
| 46 | * @return TabCollection |
||
| 47 | */ |
||
| 48 | public function addTab(Tab $tab){ |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return array |
||
| 54 | */ |
||
| 55 | public function toArray(){ |
||
| 64 | } |