本文整理匯總了PHP中Memcached_DataObject::listGet方法的典型用法代碼示例。如果您正苦於以下問題:PHP Memcached_DataObject::listGet方法的具體用法?PHP Memcached_DataObject::listGet怎麽用?PHP Memcached_DataObject::listGet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Memcached_DataObject
的用法示例。
在下文中一共展示了Memcached_DataObject::listGet方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getNotices
function getNotices($offset, $limit, $sinceId = null, $maxId = null)
{
$all = Memcached_DataObject::listGet('Notice', 'conversation', array($this->id));
$notices = $all[$this->id];
// Re-order in reverse-chron
usort($notices, array('RawConversationNoticeStream', '_reverseChron'));
// FIXME: handle since and max
$wanted = array_slice($notices, $offset, $limit);
return new ArrayWrapper($wanted);
}
示例2: fillRepeats
static function fillRepeats(&$notices)
{
$ids = self::_idsOf($notices);
$repeatMap = Memcached_DataObject::listGet('Notice', 'repeat_of', $ids);
foreach ($notices as $notice) {
$repeats = $repeatMap[$notice->id];
$notice->_setRepeats($repeats);
}
}
示例3: _allNotices
function _allNotices($notices)
{
$convId = array();
foreach ($notices as $notice) {
$convId[] = $notice->conversation;
}
$convId = array_unique($convId);
$allMap = Memcached_DataObject::listGet('Notice', 'conversation', $convId);
$allArray = array();
foreach ($allMap as $convId => $convNotices) {
$allArray = array_merge($allArray, $convNotices);
}
return $allArray;
}
示例4: getMessagesFrom
function getMessagesFrom()
{
$msgMap = Memcached_DataObject::listGet('Message', 'from_profile', array($this->user->id));
$messages = $msgMap[$this->user->id];
if (!empty($this->after)) {
$messages = array_filter($messages, array($this, 'createdAfter'));
}
return $messages;
}