glpi / src / Vigilo / VigiloGroups.php @ c482ac76
History | View | Annotate | Download (578 Bytes)
1 | a5c9df40 | Thibault Louet | <?php
|
---|---|---|---|
2 | |||
3 | class VigiloGroups extends VigiloXml |
||
4 | { |
||
5 | protected $name; |
||
6 | protected $grps; |
||
7 | |||
8 | public function __construct($name) |
||
9 | { |
||
10 | $this->name = $name; |
||
11 | $this->grps=array(); |
||
12 | } |
||
13 | |||
14 | public function getName() |
||
15 | { |
||
16 | return $this->name; |
||
17 | } |
||
18 | |||
19 | public function addSubGroup(VigiloGroups $subGroup) |
||
20 | { |
||
21 | $this->grps[$subGroup->getName()] = $subGroup; |
||
22 | } |
||
23 | |||
24 | public function __toString() |
||
25 | { |
||
26 | return self::sprintf( |
||
27 | '<group name="%s">%s</group>',
|
||
28 | $this->name,
|
||
29 | $this->grps
|
||
30 | ); |
||
31 | } |
||
32 | } |