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