1 | <?php |
||
7 | class Channel |
||
8 | { |
||
9 | private $name; |
||
10 | private $driver; |
||
11 | private $parameters; |
||
12 | |||
13 | 1 | public function __construct(string $name, string $driver, array $parameters) |
|
19 | |||
20 | /** |
||
21 | * Name of the channel. |
||
22 | * |
||
23 | * @return string |
||
24 | */ |
||
25 | 1 | public function getName(): string |
|
29 | |||
30 | /** |
||
31 | * Get driver name. |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | public function getDriver(): string |
||
36 | { |
||
37 | return $this->driver; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Channel parameters. |
||
42 | * |
||
43 | * @return array |
||
44 | */ |
||
45 | 1 | public function getParameters(): array |
|
49 | |||
50 | /** |
||
51 | * Get single parameter value. |
||
52 | * |
||
53 | * @param string $name |
||
54 | * @param null $default |
||
55 | * |
||
56 | * @return mixed |
||
57 | */ |
||
58 | 1 | public function getParameter(string $name, $default = null) |
|
62 | } |
||
63 |