当前位置: 首页>>代码示例>>PHP>>正文


PHP common_user_cache_hash函数代码示例

本文整理汇总了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;
 }
开发者ID:GreenLunar,项目名称:qvitter,代码行数:16,代码来源:apitimelinefriendshiddenreplies.php

示例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())) . '"';
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:13,代码来源:autocomplete.php

示例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;
 }
开发者ID:ronhuang,项目名称:statusnet,代码行数:15,代码来源:apistatusesshow.php

示例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)) . '"';
 }
开发者ID:stevertiqo,项目名称:StatusNet,代码行数:14,代码来源:shownotice.php

示例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)) . '"';
 }
开发者ID:phpsource,项目名称:gnu-social,代码行数:11,代码来源:redirecturl.php

示例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)) . '"';
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:17,代码来源:showgroupmessage.php

示例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;
 }
开发者ID:ronhuang,项目名称:statusnet,代码行数:18,代码来源:apisubscriptions.php

示例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())) . '"';
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:11,代码来源:redirecturl.php


注:本文中的common_user_cache_hash函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。