set() 공개 메소드

public set ( $name, $value )
 /**
  * @service language read
  * @return Gpf_Rpc_Serializable
  */
 public function getRows(Gpf_Rpc_Params $params)
 {
     $language = new Gpf_Db_Language();
     $language->setId($params->get(Gpf_Db_Table_Languages::ID));
     $language->load();
     $filters = $params->get('filters');
     $filters[0][2] = htmlspecialchars($filters[0][2]);
     $params->set('filters', $filters);
     $this->setCsvReader(new Gpf_Io_Csv_Reader(Gpf_Lang_CsvLanguage::getAccountCsvFileName($language->getCode())));
     return parent::getRows($params);
 }
예제 #2
0
 protected function createFilterCollection(Gpf_Rpc_Params $params) {
     $this->filterCollection = new Gpf_Rpc_FilterCollection($params);
     if ($params->get('itemId') == '') {
         if ($this->filterCollection->isFilter('affiliate') && $this->filterCollection->getFilterValue('affiliate') != '') {
             $params->set('itemId', $this->getAffiliateIds($this->filterCollection->getFilterValue('affiliate')));
         }
         if ($this->filterCollection->isFilter('onlyTopAffiliates') && $this->filterCollection->getFilterValue('onlyTopAffiliates') == Gpf::YES) {
             $this->onlyTopAffiliates = true;
         }
     }
     $this->removeAffiliateFilter();
 }
예제 #3
0
    private function initParameters(Gpf_Rpc_Params $params) {
        $sortColumn = $params->get('sort_col');

        if(in_array($sortColumn, array('imps', 'clicks', 'ctr'))) {
            // for custom sorts disable offset and limit, we'll have to do it manualy
            $this->localLimit = $params->get('limit');
            if(!is_numeric($this->localLimit)) {
                $this->localLimit = 100;
            }
            $params->set('limit', 10000);

            $this->localOffset = $params->get('offset');
            if(!is_numeric($this->localOffset) || $this->localOffset < 0) {
                $this->localOffset = 0;
            }
            $params->set('offset', 0);
        }
    }
 private function processChannel(Gpf_Rpc_Params $params) {
     $fields = $params->get("fields");
     $channelCode = $this->getField($fields, 'channel');
     $user = $this->getField($fields, 'userid');
     $channel = new Pap_Db_Channel();
     $channel->setValue($channelCode);
     $channel->setPapUserId($user);
     try {
         $channel->loadFromData(array(Pap_Db_Table_Channels::VALUE, Pap_Db_Table_Channels::USER_ID));
     } catch (Gpf_Exception $e) {
         Gpf_Log::error('Unable to load channel from channel code during manual saving transaction');
         return $params;
     }
     $fields = $this->setField($fields, 'channel', $channel->get(Pap_Db_Table_Channels::ID));
     $params->set('fields', $fields);
     return $params;
 }