1 | <?php |
||
13 | class Channel implements ChannelInterface |
||
14 | { |
||
15 | private $name; |
||
16 | |||
17 | /** |
||
18 | * Channel constructor. |
||
19 | * |
||
20 | * @param string $name |
||
21 | */ |
||
22 | 17 | public function __construct($name) |
|
26 | |||
27 | /** |
||
28 | * @param string $name |
||
29 | * |
||
30 | * @return self |
||
31 | */ |
||
32 | 17 | private function setName($name) |
|
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | 5 | public function getChannel() |
|
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | 4 | public function __toString() |
|
85 | |||
86 | /** |
||
87 | * Check if the name is valid against a regular expression. |
||
88 | * |
||
89 | * @param string $name |
||
90 | * @param string $validationRegex |
||
91 | * |
||
92 | * @return bool |
||
93 | */ |
||
94 | 15 | private function isValidName($name, $validationRegex) |
|
106 | } |
||
107 |