本文整理匯總了PHP中Properties::deleteAllProperties方法的典型用法代碼示例。如果您正苦於以下問題:PHP Properties::deleteAllProperties方法的具體用法?PHP Properties::deleteAllProperties怎麽用?PHP Properties::deleteAllProperties使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Properties
的用法示例。
在下文中一共展示了Properties::deleteAllProperties方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
$files = $fdb->getFiles();
if ($files && count($files) > 0) {
foreach ($files as $file) {
$fdb->deleteFile($file->key);
}
}
// Delete all stories
$stdb = new Stories();
$stories = $stdb->getStories();
if ($stories && count($stories) > 0) {
foreach ($stories as $story) {
$stdb->deleteStory($story['id']);
}
}
// Delete all widgets
$wdb = new Widgets();
$widgets = $wdb->getWidgets();
if ($widgets && count($widgets) > 0) {
foreach ($widgets as $widget) {
$wdb->deleteWidget($widget['id']);
}
}
// Delete all properties
$up = new Properties(array(Properties::KEY => $user->id));
$up->deleteAllProperties();
$wp = new WidgetsProperties(array(Properties::KEY => $user->id));
$wp->deleteAllProperties();
// Delete the user
$udb->deleteUser($user->id);
// Exit with proper message
die("User {$user->username} has been deleted.\r\n");