clear() public method

public clear ( )
Esempio n. 1
0
 public function getBanners(Gpf_Data_RecordSet $recordSet) {
     $result = $recordSet->toShalowRecordSet();
     foreach ($recordSet as $record) {
         try {
             try {
                 Pap_Db_Table_UserInCommissionGroup::getStatus($record->get('campaignid'), Gpf_Session::getAuthUser()->getPapUserId());
             } catch (Gpf_DbEngine_NoRowException $e) {
                 if ($record->get('ctype') == Pap_Db_Campaign::CAMPAIGN_TYPE_ON_INVITATION) {
                     throw new Gpf_Exception($this->_('Private campaign'));
                 }
             }
             $result->addRecord($record);
         } catch (Gpf_Exception $e) {
         }
     }
     $recordSet->clear();
     $recordSet->loadFromObject($result->toObject());
 }