本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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;
}