4 * A mock-implementation of the regular report options
5 * In particular, it exposes a way to set arbitrary report properties and members
7 class Test_report_options
extends Avail_options
{
8 public $properties_copy; /**< A public reference to the protected properties array */
9 public $members = array(); /**< A public list of group members used by our get_report_members */
11 * Create new test report, optionally with default options
13 public function __construct($options=false) {
14 parent
::__construct($options);
15 if (isset($options->members
))
16 $this->members
= $options->members
;
17 $this->properties_copy
=& $this->properties
;
21 * Return the report members you've setup for group reports,
22 * otherwise return the report's actual members
24 function get_report_members()
26 switch ($this['report_type']) {
29 $res_members = array();
30 foreach ($this->members
as $group => $members) {
31 if (in_array($group, $this['objects']))
32 $res_members = array_merge($res_members, $members);
36 return parent
::get_report_members();