本文整理汇总了PHP中Memcached_DataObject::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Memcached_DataObject::delete方法的具体用法?PHP Memcached_DataObject::delete怎么用?PHP Memcached_DataObject::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Memcached_DataObject
的用法示例。
在下文中一共展示了Memcached_DataObject::delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
function delete()
{
$filename = $this->filename;
if (parent::delete()) {
@unlink(Avatar::path($filename));
}
}
示例2: delete
function delete()
{
$filename = $this->filename;
if (parent::delete()) {
//@unlink(Image::path($filename));
}
}
示例3: delete
/**
* Delete a Consumer and related tokens and nonces
*
* XXX: Should this happen in an OAuthDataStore instead?
*
*/
function delete()
{
// XXX: Is there any reason NOT to do this kind of cleanup?
$this->_deleteTokens();
$this->_deleteNonces();
parent::delete();
}
示例4: delete
function delete()
{
$f = File::staticGet('id', $this->file_id);
if (!empty($f)) {
$f->blowCache();
}
return parent::delete();
}
示例5: delete
function delete()
{
$profile = Profile::staticGet('id', $this->user_id);
$notice = Notice::staticGet('id', $this->notice_id);
$result = null;
if (Event::handle('StartDisfavorNotice', array($profile, $notice, &$result))) {
$result = parent::delete();
if ($result) {
Event::handle('EndDisfavorNotice', array($profile, $notice));
}
}
return $result;
}
示例6: delete
function delete()
{
$this->blowCaches(true);
$this->blowFavesCache(true);
$this->blowSubsCache(true);
$this->query('BEGIN');
$related = array('Reply', 'Fave', 'Notice_tag', 'Group_inbox', 'Queue_item');
if (common_config('inboxes', 'enabled')) {
$related[] = 'Notice_inbox';
}
foreach ($related as $cls) {
$inst = new $cls();
$inst->notice_id = $this->id;
$inst->delete();
}
$result = parent::delete();
$this->query('COMMIT');
}
示例7: delete
function delete()
{
$this->_deleteAppUsers();
$consumer = $this->getConsumer();
$consumer->delete();
parent::delete();
}
示例8: delete
function delete()
{
$result = parent::delete();
if ($result) {
Config::_blowSettingsCache();
}
return $result;
}
示例9: delete
function delete()
{
$result = parent::delete();
if ($result) {
self::blow('profile_list:subscriber_count:%d', $this->profile_tag_id);
}
return $result;
}
示例10: delete
function delete()
{
$this->_deleteNotices();
$this->_deleteSubscriptions();
$this->_deleteMessages();
$this->_deleteTags();
$this->_deleteBlocks();
$this->delete_avatars();
// Warning: delete() will run on the batch objects,
// not on individual objects.
$related = array('Reply', 'Group_member');
Event::handle('ProfileDeleteRelated', array($this, &$related));
foreach ($related as $cls) {
$inst = new $cls();
$inst->profile_id = $this->id;
$inst->delete();
}
parent::delete();
}
示例11: delete
function delete()
{
// For auditing purposes, save a record that the notice
// was deleted.
// @fixme we have some cases where things get re-run and so the
// insert fails.
$deleted = Deleted_notice::staticGet('id', $this->id);
if (!$deleted) {
$deleted = new Deleted_notice();
$deleted->id = $this->id;
$deleted->profile_id = $this->profile_id;
$deleted->uri = $this->uri;
$deleted->created = $this->created;
$deleted->deleted = common_sql_now();
$deleted->insert();
}
if (Event::handle('NoticeDeleteRelated', array($this))) {
// Clear related records
$this->clearReplies();
$this->clearRepeats();
$this->clearFaves();
$this->clearTags();
$this->clearGroupInboxes();
// NOTE: we don't clear inboxes
// NOTE: we don't clear queue items
}
$result = parent::delete();
$this->blowOnDelete();
return $result;
}
示例12: delete
function delete()
{
// For auditing purposes, save a record that the notice
// was deleted.
$deleted = new Deleted_notice();
$deleted->id = $this->id;
$deleted->profile_id = $this->profile_id;
$deleted->uri = $this->uri;
$deleted->created = $this->created;
$deleted->deleted = common_sql_now();
$deleted->insert();
// Clear related records
$this->clearReplies();
$this->clearRepeats();
$this->clearFaves();
$this->clearTags();
$this->clearGroupInboxes();
// NOTE: we don't clear inboxes
// NOTE: we don't clear queue items
$result = parent::delete();
$this->blowOnDelete();
return $result;
}
示例13: delete
/**
* Gracefully delete one or many people tags
* along with their members and subscriptions data
*
* @return boolean success
*/
function delete()
{
// force delete one item at a time.
if (empty($this->id)) {
$this->find();
while ($this->fetch()) {
$this->delete();
}
}
Profile_tag::cleanup($this);
Profile_tag_subscription::cleanup($this);
self::blow('profile:lists:%d', $this->tagger);
return parent::delete();
}
示例14: delete
function delete()
{
$this->_deleteNotices();
$this->_deleteSubscriptions();
$this->_deleteMessages();
$this->_deleteTags();
$this->_deleteBlocks();
$related = array('Avatar', 'Reply', 'Group_member');
Event::handle('ProfileDeleteRelated', array($this, &$related));
foreach ($related as $cls) {
$inst = new $cls();
$inst->profile_id = $this->id;
$inst->delete();
}
parent::delete();
}
示例15: delete
function delete()
{
$result = parent::delete();
if ($result) {
self::blow('profile_list:tagged_count:%d:%s', $this->tagger, $this->tag);
}
return $result;
}