本文整理汇总了PHP中common_user_cache_hash函数的典型用法代码示例。如果您正苦于以下问题:PHP common_user_cache_hash函数的具体用法?PHP common_user_cache_hash怎么用?PHP common_user_cache_hash使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了common_user_cache_hash函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: etag
/**
* An entity tag for this stream
*
* Returns an Etag based on the action name, language, user ID, and
* timestamps of the first and last notice in the timeline
*
* @return string etag
*/
function etag()
{
if (!empty($this->notices) && count($this->notices) > 0) {
$last = count($this->notices) - 1;
return '"' . implode(':', array($this->arg('action'), common_user_cache_hash($this->auth_user), common_language(), $this->target->id, strtotime($this->notices[0]->created), strtotime($this->notices[$last]->created))) . '"';
}
return null;
}
示例2: etag
/**
* An entity tag for this page
*
* Shows the ETag for the page, based on the notice ID and timestamps
* for the notice, profile, and avatar. It's weak, since we change
* the date text "one hour ago", etc.
*
* @return string etag
*/
function etag()
{
return '"' . implode(':', array($this->arg('action'), common_user_cache_hash(), crc32($this->arg('term')), $this->arg('limit'), $this->lastModified())) . '"';
}
示例3: etag
/**
* An entity tag for this notice
*
* Returns an Etag based on the action name, language, and
* timestamps of the notice
*
* @return string etag
*/
function etag()
{
if (!empty($this->notice)) {
return '"' . implode(':', array($this->arg('action'), common_user_cache_hash($this->auth_user), common_language(), $this->notice->id, strtotime($this->notice->created))) . '"';
}
return null;
}
示例4: etag
/**
* An entity tag for this page
*
* Shows the ETag for the page, based on the notice ID and timestamps
* for the notice, profile, and avatar. It's weak, since we change
* the date text "one hour ago", etc.
*
* @return string etag
*/
function etag()
{
$avtime = $this->avatar ? strtotime($this->avatar->modified) : 0;
return 'W/"' . implode(':', array($this->arg('action'), common_user_cache_hash(), common_language(), $this->notice->id, strtotime($this->notice->created), strtotime($this->profile->modified), $avtime)) . '"';
}
示例5: etag
/**
* Return etag, if applicable.
*
* MAY override
*
* @return string etag http header
*/
function etag()
{
return 'W/"' . implode(':', array($this->arg('action'), common_user_cache_hash(), common_language(), $this->file->id)) . '"';
}
示例6: etag
/**
* Return etag, if applicable.
*
* MAY override
*
* @return string etag http header
*/
function etag()
{
try {
$avatar = $this->sender->getAvatar(AVATAR_STREAM_SIZE);
$avtime = strtotime($avatar->modified);
} catch (Exception $e) {
$avtime = 0;
}
return 'W/"' . implode(':', array($this->arg('action'), common_user_cache_hash(), common_language(), $this->gm->id, strtotime($this->sender->modified), strtotime($this->group->modified), $avtime)) . '"';
}
示例7: etag
/**
* An entity tag for this action
*
* Returns an Etag based on the action name, language, user ID, and
* timestamps of the first and last profiles in the subscriptions list
* There's also an indicator to show whether this action is being called
* as /api/statuses/(friends|followers) or /api/(friends|followers)/ids
*
* @return string etag
*/
function etag()
{
if (!empty($this->profiles) && count($this->profiles) > 0) {
$last = count($this->profiles) - 1;
return '"' . implode(':', array($this->arg('action'), common_user_cache_hash($this->auth_user), common_language(), $this->user->id, isset($this->ids_only) ? 'IDs' : 'Profiles', strtotime($this->profiles[0]->created), strtotime($this->profiles[$last]->created))) . '"';
}
return null;
}
示例8: etag
/**
* Return etag, if applicable.
*
* MAY override
*
* @return string etag http header
*/
function etag()
{
return 'W/"' . implode(':', array($this->getActionName(), common_user_cache_hash(), common_language(), $this->file->getID())) . '"';
}