本文整理匯總了PHP中iaUtil::cascadeDeleteFiles方法的典型用法代碼示例。如果您正苦於以下問題:PHP iaUtil::cascadeDeleteFiles方法的具體用法?PHP iaUtil::cascadeDeleteFiles怎麽用?PHP iaUtil::cascadeDeleteFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類iaUtil
的用法示例。
在下文中一共展示了iaUtil::cascadeDeleteFiles方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: clearGlobalCache
public function clearGlobalCache()
{
$this->clearAll();
iaUtil::cascadeDeleteFiles(IA_TMP, true);
}
示例2: delete
public function delete($statement = null)
{
$rows = $this->iaDb->all(iaDb::ALL_COLUMNS_SELECTION, $statement, null, null, self::getTable());
$result = $this->iaDb->delete($statement, self::getTable());
if ($result) {
$actionName = 'member_removal';
$emailNotificationEnabled = $this->iaCore->get($actionName);
$iaMailer = $this->iaCore->factory('mailer');
$iaLog = $this->iaCore->factory('log');
foreach ($rows as $entry) {
// delete member uploads folder
$folder = IA_UPLOADS . iaUtil::getAccountDir($entry['username']);
iaUtil::cascadeDeleteFiles($folder, true) && @rmdir($folder);
$iaLog->write(iaLog::ACTION_DELETE, array('item' => 'member', 'name' => $entry['fullname'], 'id' => $entry['id']));
$this->iaCore->startHook('phpUserDelete', array('userInfo' => $entry));
if ($emailNotificationEnabled) {
$iaMailer->loadTemplate($actionName);
$iaMailer->addAddress($entry['email'], $entry['fullname']);
$iaMailer->setReplacements('fullname', $entry['fullname']);
$iaMailer->send();
}
}
}
return $result;
}