forked from nybohansen/rostanvo
/
Clicks.class.php
59 lines (52 loc) · 1.5 KB
/
Clicks.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* @copyright Copyright (c) 2007 Quality Unit s.r.o.
* @author Michal Bebjak
* @package PostAffiliatePro
* @since Version 1.0.0
*
* Licensed under the Quality Unit, s.r.o. Standard End User License Agreement,
* Version 1.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.qualityunit.com/licenses/license
*
*/
/**
* @package PostAffiliatePro
*/
class Pap_Stats_Clicks extends Pap_Stats_Base {
/**
* @var Pap_Stats_Data_Click
*/
private $count = null;
/**
* @var Pap_Stats_Data_Commission
*/
private $commission = null;
/**
* @return Pap_Stats_Data_Click
*/
public function getCount() {
if ($this->count == null) {
$computer = new Pap_Stats_Computer_Clicks($this->params);
$computer->computeStats();
$this->count = $computer->getResult();
}
return $this->count;
}
/**
* @return Pap_Stats_Data_Commission
*/
public function getCommission() {
if ($this->commission == null) {
$computer = new Pap_Stats_Computer_Transactions($this->params, Pap_Common_Constants::TYPE_CLICK);
$computer->computeStats();
$this->commission = $computer->getCommissions();
}
return $this->commission;
}
protected function getValueNames() {
return array('count', 'commission');
}
}
?>