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


PHP Notice::inScope方法代码示例

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


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

示例1: filter

 /**
  * Only return notices where the profile is in scope
  *
  * @param Notice $notice The notice to check
  *
  * @return boolean whether to include the notice
  */
 function filter($notice)
 {
     return $notice->inScope($this->profile);
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:11,代码来源:scopingnoticestream.php

示例2: onStartEnqueueNotice

 /**
  * Put saved notices into the queue for OMB distribution
  *
  * @param Notice $notice     the notice to broadcast
  * @param array  $transports queuehandler's list of transports
  * @return boolean true if queing was successful
  */
 function onStartEnqueueNotice($notice, &$transports)
 {
     if ($notice->isLocal()) {
         if ($notice->inScope(null)) {
             array_unshift($transports, 'omb');
             common_log(LOG_INFO, "Notice {$notice->id} queued for OMB processing");
         } else {
             // Note: We don't do privacy-controlled OMB updates.
             common_log(LOG_NOTICE, "Not queueing notice {$notice->id} for OMB because of " . "privacy; scope = {$notice->scope}", __FILE__);
         }
     } else {
         common_log(LOG_NOTICE, "Not queueing notice {$notice->id} for OMB because it's not " . "local.", __FILE__);
     }
     return true;
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:22,代码来源:OMBPlugin.php

示例3: onStartEnqueueNotice

 /**
  * Add a Twitter queue item for each notice
  *
  * @param Notice $notice      the notice
  * @param array  &$transports the list of transports (queues)
  *
  * @return boolean hook return
  */
 function onStartEnqueueNotice($notice, &$transports)
 {
     if (self::hasKeys() && $notice->isLocal() && $notice->inScope(null)) {
         // Avoid a possible loop
         if ($notice->source != 'twitter') {
             array_push($transports, 'twitter');
         }
     }
     return true;
 }
开发者ID:phpsource,项目名称:gnu-social,代码行数:18,代码来源:TwitterBridgePlugin.php

示例4: onStartEnqueueNotice

 /**
  * Add a Facebook queue item for each notice
  *
  * @param Notice $notice      the notice
  * @param array  &$transports the list of transports (queues)
  *
  * @return boolean hook return
  */
 function onStartEnqueueNotice($notice, &$transports)
 {
     if (self::hasApplication() && $notice->isLocal() && $notice->inScope(null)) {
         array_push($transports, 'facebook');
     }
     return true;
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:15,代码来源:FacebookBridgePlugin.php


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