本文整理汇总了PHP中Provider::recalculate方法的典型用法代码示例。如果您正苦于以下问题:PHP Provider::recalculate方法的具体用法?PHP Provider::recalculate怎么用?PHP Provider::recalculate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Provider
的用法示例。
在下文中一共展示了Provider::recalculate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: startRecalculationAjax
public function startRecalculationAjax()
{
if (Status::isCalculationInProgress()) {
return \BootstrapUI::buttonRemoteResponse()->text('Calculation is already in progress');
}
return \BootstrapUI::buttonRemoteResponse()->disableButton()->text('Recalculation is in progress...')->after(function () {
set_time_limit(0);
\Status::calculationStarted();
\Status::setCalculationStatus('Recalculating brands');
\Brand::recalculate();
\Status::setCalculationStatus('Recalculating countries');
\Country::recalculate();
\Status::setCalculationStatus('Recalculating packages');
\Package::recalculate();
\Status::setCalculationStatus('Recalculating package versions');
\Package\Version::recalculate();
\Status::setCalculationStatus('Recalculating phone models');
\Phone\Model::recalculate();
\Status::setCalculationStatus('Recalculating product names');
\Product::recalculate();
\Status::setCalculationStatus('Recalculating providers');
\Provider::recalculate();
\Status::setCalculationStatus('Recalculating stack traces');
\Stack\Trace::recalculate();
\Status::setCalculationStatus('Recalculating OS versions');
\Version::recalculate();
\Status::calculationFinished('all');
});
}