示例#1
0
 /**
  * @param CAccount $oAccount
  *
  * @return array|bool
  */
 public function getFetchers($oAccount)
 {
     $mResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->getFetchers($oAccount))) {
         $oRow = null;
         $mResult = array();
         while (false !== ($oRow = $this->oConnection->GetNextRecord())) {
             $oFetcher = new CFetcher($oAccount);
             $oFetcher->InitByDbRow($oRow);
             $mResult[] = $oFetcher;
         }
     }
     $this->throwDbExceptionIfExist();
     return $mResult;
 }
示例#2
0
 /**
  * @param CAccount $oAccount
  * @return string
  */
 public function getFetchers($oAccount)
 {
     $aMap = api_AContainer::DbReadKeys(CFetcher::getStaticMap());
     $aMap = array_map(array($this, 'escapeColumn'), $aMap);
     $sSql = 'SELECT %s FROM %sawm_fetchers WHERE %s = %d';
     return sprintf($sSql, implode(', ', $aMap), $this->prefix(), $this->escapeColumn('id_acct'), $oAccount->IdAccount);
 }