glpi / src / Vigilo / VigiloGroups.php @ ad6689da
History | View | Annotate | Download (594 Bytes)
1 |
<?php
|
---|---|
2 |
|
3 |
class VigiloGroups extends VigiloXml |
4 |
{ |
5 |
protected $name; |
6 |
protected $groups; |
7 |
|
8 |
public function __construct($name) |
9 |
{ |
10 |
$this->name = $name; |
11 |
$this->groups = array(); |
12 |
} |
13 |
|
14 |
public function getName() |
15 |
{ |
16 |
return $this->name; |
17 |
} |
18 |
|
19 |
public function addSubGroup(VigiloGroups $subGroup) |
20 |
{ |
21 |
$this->groups[$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->groups
|
30 |
); |
31 |
} |
32 |
} |