本文整理匯總了PHP中erLhcoreClassInstance::informAboutExpiration方法的典型用法代碼示例。如果您正苦於以下問題:PHP erLhcoreClassInstance::informAboutExpiration方法的具體用法?PHP erLhcoreClassInstance::informAboutExpiration怎麽用?PHP erLhcoreClassInstance::informAboutExpiration使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類erLhcoreClassInstance
的用法示例。
在下文中一共展示了erLhcoreClassInstance::informAboutExpiration方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
<?php
// php cron.php -s site_admin -e instance -c cron/maintain
$cfgSite = erConfigClassLhConfig::getInstance();
if ($cfgSite->getSetting('site', 'expire_disabled', false) == false) {
foreach (erLhcoreClassModelInstance::getList(array('filtergt' => array('expires' => 0), 'filterlt' => array('expires' => time() - $cfgSite->getSetting('site', 'terminate_period', 14) * 24 * 3600))) as $item) {
$item->removeThis();
}
}
echo "Expire status:\n";
print_r(erLhcoreClassInstance::informAboutExpiration());
foreach (erLhcoreClassModelInstance::getList(array('filter' => array('terminate' => 1))) as $item) {
$item->removeThis();
}
foreach (erLhcoreClassModelInstance::getList(array('filter' => array('status' => erLhcoreClassModelInstance::PENDING_CREATE))) as $item) {
echo "Starting creating customer - ", $item->id, "\n";
erLhcoreClassInstance::createCustomer($item);
echo "Creating customer - ", $item->id, "\n";
}