本文整理汇总了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();
}