| 1 | <?php |
||
| 13 | class Room |
||
| 14 | { |
||
| 15 | |||
| 16 | public $id; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var Client[] |
||
| 20 | */ |
||
| 21 | public $members = []; |
||
| 22 | |||
| 23 | |||
| 24 | public function __construct($id) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param Client $client |
||
| 31 | */ |
||
| 32 | function addMember($client) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param Client $client |
||
| 39 | */ |
||
| 40 | function removeMember($client) |
||
| 44 | |||
| 45 | function hasMember($client) |
||
| 52 | } |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.