| 1 | <?php |
||
| 7 | class ChannelManager |
||
| 8 | { |
||
| 9 | /** @var array */ |
||
| 10 | private $channels; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Add channel. |
||
| 14 | * |
||
| 15 | * @param string $name |
||
| 16 | * @param array $parameters |
||
| 17 | */ |
||
| 18 | 3 | public function add(string $name, array $parameters): void |
|
| 22 | |||
| 23 | /** |
||
| 24 | * Get all channels. |
||
| 25 | * |
||
| 26 | * @return array |
||
| 27 | */ |
||
| 28 | 1 | public function all(): array |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Create channel. |
||
| 35 | * |
||
| 36 | * @param string $name |
||
| 37 | * |
||
| 38 | * @return Channel |
||
| 39 | * @throws ChannelNotFound |
||
| 40 | */ |
||
| 41 | 3 | public function create(string $name): Channel |
|
| 54 | } |
||
| 55 |