protected function buildWhere(Pap_Stats_Params $statParams) { $statParams->addTo($this->transactionsSelect); if ($statParams->isTypeDefined()) { $this->transactionsSelect->where->add(Pap_Db_Table_Transactions::R_TYPE, 'IN', explode(',', $statParams->getType())); } if ($statParams->isStatusDefined()) { if (is_array($statParams->getStatus())) { $this->transactionsSelect->where->add(Pap_Db_Table_Transactions::R_STATUS, 'IN', $statParams->getStatus()); } else { $this->transactionsSelect->where->add(Pap_Db_Table_Transactions::R_STATUS, 'IN', explode(',', $statParams->getStatus())); } } }