/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

class SUMExtractor implements DATAExtractionInterface {
 function __construct($mask, array $opts) {
 }

 static function GetItemList(array $base_item, $flags) {
    return array(
        array("id" => "sum", "name" => "%s (summation)")
    );
 }
 
 
 function ExtractItem(&$data, $time, $id, &$value) {
    if (is_array($value)) {
        return array(array_sum($value));
    }
    return array(NULL);
 }
}


?>