1 | <?php |
||
18 | class ChannelManager extends Manager implements ManagerContract |
||
19 | { |
||
20 | /** @var Collection */ |
||
21 | private $channels; |
||
22 | |||
23 | 74 | public function __construct() |
|
27 | |||
28 | /** |
||
29 | * Register channels. |
||
30 | * |
||
31 | * @param array $channels |
||
32 | */ |
||
33 | 74 | public function register(array $channels): void |
|
37 | |||
38 | /** |
||
39 | * Get all channels. |
||
40 | * |
||
41 | * @return Collection |
||
42 | */ |
||
43 | 1 | public function all(): Collection |
|
47 | |||
48 | /** |
||
49 | * Get channels by driver. |
||
50 | * |
||
51 | * @param string $driver |
||
52 | * |
||
53 | * @return Collection |
||
54 | */ |
||
55 | public function getByDriver(string $driver): Collection |
||
61 | |||
62 | /** |
||
63 | * Create channel. |
||
64 | * |
||
65 | * @param string $name |
||
66 | * |
||
67 | * @return Channel |
||
68 | * @throws ChannelNotFound |
||
69 | */ |
||
70 | 2 | public function create(string $name): Channel |
|
84 | |||
85 | /** |
||
86 | * Get the default driver name. |
||
87 | * |
||
88 | * @return string |
||
89 | */ |
||
90 | 1 | public function getDefaultDriver(): ?string |
|
94 | } |
||
95 |