本文整理匯總了PHP中Bitrix\Sale\Location\LocationTable::getCountByFilter方法的典型用法代碼示例。如果您正苦於以下問題:PHP LocationTable::getCountByFilter方法的具體用法?PHP LocationTable::getCountByFilter怎麽用?PHP LocationTable::getCountByFilter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Bitrix\Sale\Location\LocationTable
的用法示例。
在下文中一共展示了LocationTable::getCountByFilter方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: stageProcessFiles
protected function stageProcessFiles()
{
if ($this->dbConnType == self::DB_TYPE_ORACLE) {
$mtu = self::INSERTER_MTU_ORACLE;
} else {
$mtu = self::INSERTER_MTU;
}
$this->hitData['HANDLES']['LOCATION'] = new BlockInserter(array('entityName' => '\\Bitrix\\Sale\\Location\\LocationTable', 'exactFields' => array('CODE', 'TYPE_ID', 'PARENT_ID', 'LATITUDE', 'LONGITUDE'), 'parameters' => array('autoIncrementFld' => 'ID', 'mtu' => $mtu)));
$this->hitData['HANDLES']['NAME'] = new BlockInserter(array('entityName' => '\\Bitrix\\Sale\\Location\\Name\\LocationTable', 'exactFields' => array('NAME', 'NAME_UPPER', 'LANGUAGE_ID', 'LOCATION_ID'), 'parameters' => array('mtu' => $mtu)));
$this->hitData['HANDLES']['EXTERNAL'] = new BlockInserter(array('entityName' => '\\Bitrix\\Sale\\Location\\ExternalTable', 'exactFields' => array('SERVICE_ID', 'XML_ID', 'LOCATION_ID'), 'parameters' => array('mtu' => $mtu)));
if ($this->getStep() == 0) {
// set initial values
$this->data['current'] = array('fIndex' => 0, 'bytesRead' => 0, 'linesRead' => 0);
$this->hitData['HANDLES']['LOCATION']->resetAutoIncrementFromIndex();
// synchronize sequences, etc...
// check if we are empty
$this->data['TABLE_WERE_EMPTY'] = Location\LocationTable::getCountByFilter() == 0;
$this->buildStaticLocationIndex();
}
while ($this->checkQuota()) {
$block = $this->readBlockFromCurrentFile2();
$this->importBlock($block);
// clean memory
$this->manageExistedLocationIndex(array($this->getCurrentGid()));
// or the current file is completely exhausted
if ($this->checkFileCompletelyRead()) {
//$this->logMessage('Lines read: '.$this->data['current']['linesRead']);
// charge next file
unset($this->hitData['csv']);
$this->data['current']['fIndex']++;
// next file to go
$this->data['current']['bytesRead'] = 0;
// read counter from the beginning
$this->data['current']['linesRead'] = 0;
$this->data['current']['legacy'] = array();
// drop legacy data of the file, if were any. bye-bye
// may be that is all?
if ($this->checkAllFilesRead()) {
unset($this->data['existedlocs']);
// uff, remove that huge array at last
$this->nextStage();
break;
}
}
$this->nextStep();
}
$this->hitData['HANDLES']['LOCATION']->flush();
$this->hitData['HANDLES']['NAME']->flush();
$this->hitData['HANDLES']['EXTERNAL']->flush();
$this->logMessage('Inserted, go next: ' . $this->getHitTimeString());
$this->logMemoryUsage();
}