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


PHP Ostatus_profile::localProfile方法代码示例

本文整理汇总了PHP中Ostatus_profile::localProfile方法的典型用法代码示例。如果您正苦于以下问题:PHP Ostatus_profile::localProfile方法的具体用法?PHP Ostatus_profile::localProfile怎么用?PHP Ostatus_profile::localProfile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ostatus_profile的用法示例。


在下文中一共展示了Ostatus_profile::localProfile方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showProfileInfo

function showProfileInfo(Ostatus_profile $oprofile)
{
    if ($oprofile->isGroup()) {
        echo "group\n";
    } else {
        $profile = $oprofile->localProfile();
        try {
            foreach (array('nickname', 'fullname', 'bio', 'homepage', 'location') as $field) {
                print "  {$field}: {$profile->{$field}}\n";
            }
        } catch (NoProfileException $e) {
            print "local profile not found";
        }
    }
    echo "\n";
}
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:16,代码来源:update-profile-data.php

示例2: SubMirror

 /**
  * Let the OStatus subscription garbage collection know if we're
  * making use of a remote feed, so it doesn't get dropped out
  * from under us.
  *
  * @param Ostatus_profile $oprofile
  * @param int $count in/out
  * @return mixed hook return value
  */
 function onOstatus_profileSubscriberCount(Ostatus_profile $oprofile, &$count)
 {
     try {
         $profile = $oprofile->localProfile();
         $mirror = new SubMirror();
         $mirror->subscribed = $profile->id;
         if ($mirror->find()) {
             while ($mirror->fetch()) {
                 $count++;
             }
         }
     } catch (NoProfileException $e) {
         // We can't handle this kind of Ostatus_profile since it has no
         // local profile
     }
     return true;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:26,代码来源:SubMirrorPlugin.php

示例3: pingReply

 function pingReply(Ostatus_profile $oprofile)
 {
     if ($this->user) {
         common_debug("OSTATUS [{$this->notice->getID()}]: pinging reply to {$oprofile->localProfile()->getNickname()} for local user '{$this->user->getID()}'");
         // For local posts, send a Salmon ping to the mentioned
         // remote user or group.
         // @fixme as an optimization we can skip this if the
         // remote profile is subscribed to the author.
         $oprofile->notifyDeferred($this->notice, $this->user);
     }
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:11,代码来源:ostatusqueuehandler.php

示例4: _postRemoteBookmark

 /**
  * Save a remote bookmark (from Salmon or PuSH)
  *
  * @param Ostatus_profile $author   Author of the bookmark
  * @param Activity        $activity Activity to save
  *
  * @return Notice resulting notice.
  */
 private static function _postRemoteBookmark(Ostatus_profile $author, Activity $activity)
 {
     $bookmark = $activity->objects[0];
     $options = array('uri' => $bookmark->id, 'url' => $bookmark->link, 'is_local' => Notice::REMOTE, 'source' => 'ostatus');
     return self::_postBookmark($author->localProfile(), $activity, $options);
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:14,代码来源:BookmarkPlugin.php


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