Ejemplo n.º 1
0
 protected function initWhereConditions() {
     parent::initWhereConditions();
     if ($this->transactionType != null) {
         $this->initTransactionTypeWhere($this->transactionType);
     }
     if ($this->commissionTypeId != null) {
         $this->initCommissionTypeIdWhere($this->commissionTypeId);
     }
     if ($this->tier != null) {
         if ($this->tier == self::HIGHER_TIERS) {
             $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::TIER, '>', 1);
         } else {
             $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::TIER, '=', $this->tier);
         }
     }
     if ($this->params->isStatusDefined()) {
         if (is_array($this->params->getStatus())) {
             $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::R_STATUS, 'IN', $this->params->getStatus());
         } else {
             $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::R_STATUS, 'IN', explode(',', $this->params->getStatus()));
         }
     }
     if ($this->params->isTypeDefined()) {
         if (is_array($this->params->getType())) {
             $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::R_TYPE, 'IN', $this->params->getType());
         } else {
             $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::R_TYPE, '=', $this->params->getType());
         }
     }
     if($this->params->getPayoutStatus() !== null) {
         $this->selectBuilder->where->add('t.'.Pap_Db_Table_Transactions::PAYOUT_STATUS, '=', $this->params->getPayoutStatus());
     }
 }
Ejemplo n.º 2
0
 public function __construct(Pap_Stats_Table $table, Pap_Stats_Params $params, $timeGroupBy) {
     parent::__construct($table, $params);
     $this->timeGroupBy = $timeGroupBy;
 }
Ejemplo n.º 3
0
 public function __construct(Pap_Stats_Params $params) {
     parent::__construct(Pap_Db_Table_Impressions::getInstance(), $params);
 }