* @package * @uses func * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html) * @Link https://www.zentao.net */ class count_of_application extends baseCalc { public $dataset = 'getApplications'; public $fieldList = array('count', 'instanceCount'); public $result = 0; public function calculate($row) { $this->result = $row->count + $row->instanceCount; } public function getResult($options = array()) { $records = $this->getRecords(array('value')); return $this->filterByOptions($records, $options); } }