本文整理汇总了PHP中Memcached_DataObject::update方法的典型用法代码示例。如果您正苦于以下问题:PHP Memcached_DataObject::update方法的具体用法?PHP Memcached_DataObject::update怎么用?PHP Memcached_DataObject::update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Memcached_DataObject
的用法示例。
在下文中一共展示了Memcached_DataObject::update方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
/**
* Update wrapper; transparently update modified column.
* @return boolean success
*/
function update($old = null)
{
$this->modified = common_sql_now();
return parent::update($old);
}
示例2: update
/**
* Flush cached subscriptions when subscription is updated
*
* Because we cache subscriptions, it's useful to flush them
* here.
*
* @param mixed $orig Original version of object
*
* @return boolean success flag.
*/
function update($orig = null)
{
$result = parent::update($orig);
self::blow('subscription:by-subscriber:' . $this->subscriber);
self::blow('subscription:by-subscribed:' . $this->subscribed);
return $result;
}
示例3: update
function update($orig = null)
{
$result = parent::update($orig);
if ($result) {
Config::_blowSettingsCache();
}
return $result;
}
示例4: update
/**
* Update a people tag gracefully
* also change "tag" fields in profile_tag table
*
* @param Profile_list $orig Object's original form
*
* @return boolean success
*/
function update($orig = null)
{
$result = true;
if (!is_object($orig) && !$orig instanceof Profile_list) {
parent::update($orig);
}
// if original tag was different
// check to see if the new tag already exists
// if not, rename the tag correctly
if ($orig->tag != $this->tag || $orig->tagger != $this->tagger) {
$existing = Profile_list::getByTaggerAndTag($this->tagger, $this->tag);
if (!empty($existing)) {
// TRANS: Server exception.
throw new ServerException(_('The tag you are trying to rename ' . 'to already exists.'));
}
// move the tag
// XXX: allow OStatus plugin to send out profile tag
$result = Profile_tag::moveTag($orig, $this);
}
parent::update($orig);
return $result;
}