本文整理汇总了PHP中thebuggenie\core\framework\Settings::getNotificationPollInterval方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::getNotificationPollInterval方法的具体用法?PHP Settings::getNotificationPollInterval怎么用?PHP Settings::getNotificationPollInterval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thebuggenie\core\framework\Settings
的用法示例。
在下文中一共展示了Settings::getNotificationPollInterval方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: config_explanation
<?php
echo config_explanation(__('When using fancy numbering, you can have a line highlighted at a regular interval. Set the default interval to use here, if not otherwise specified'));
?>
</td>
</tr>
<tr>
<td><label for="notification_poll_interval"><?php
echo __('Notification poll interval');
?>
</label></td>
<td>
<input type="text" name="<?php
echo \thebuggenie\core\framework\Settings::SETTING_NOTIFICATION_POLL_INTERVAL;
?>
" style="width: 50px;"<?php
if ($access_level != \thebuggenie\core\framework\Settings::ACCESS_FULL) {
?>
disabled<?php
}
?>
id="notification_poll_interval" value="<?php
echo \thebuggenie\core\framework\Settings::getNotificationPollInterval();
?>
" />
<?php
echo config_explanation(__('Polling is used to check for new user notifications. Set the default polling interval in seconds, or 0 to disable polling.'));
?>
</td>
</tr>
</table>
示例2: runUserdata
//.........这里部分代码省略.........
} catch (\Exception $e) {
}
return $this->renderJSON($addons_json);
break;
case 'getsearchcounts':
$counts_json = array();
foreach ($request['search_ids'] as $search_id) {
if (is_numeric($search_id)) {
$search = tables\SavedSearches::getTable()->selectById($search_id);
} else {
$predefined_id = str_replace('predefined_', '', $search_id);
$search = \thebuggenie\core\entities\SavedSearch::getPredefinedSearchObject($predefined_id);
}
if ($search instanceof entities\SavedSearch) {
$counts_json[$search_id] = $search->getTotalNumberOfIssues();
}
}
return $this->renderJSON($counts_json);
break;
case 'get_theme_updates':
$addons_param = array();
foreach ($request['addons'] as $addon) {
$addons_param[] = 'themes[]=' . $addon;
}
try {
$client = new \Net_Http_Client();
$client->get('http://www.thebuggenie.com/themes.json?' . join('&', $addons_param));
$addons_json = json_decode($client->getBody(), true);
} catch (\Exception $e) {
}
return $this->renderJSON($addons_json);
break;
case 'verify_module_update_file':
$filename = THEBUGGENIE_CACHE_PATH . $request['module_key'] . '.zip';
$exists = file_exists($filename) && dirname($filename) . DS == THEBUGGENIE_CACHE_PATH;
return $this->renderJSON(array('verified' => (int) $exists));
break;
case 'get_modules':
return $this->renderComponent('configuration/onlinemodules');
break;
case 'get_themes':
return $this->renderComponent('configuration/onlinethemes');
break;
case 'get_mentionables':
switch ($request['target_type']) {
case 'issue':
$target = entities\Issue::getB2DBTable()->selectById($request['target_id']);
break;
case 'article':
$target = \thebuggenie\modules\publish\entities\tables\Articles::getTable()->selectById($request['target_id']);
break;
case 'project':
$target = tables\Projects::getTable()->selectById($request['target_id']);
break;
}
$mentionables = array();
if (isset($target) && $target instanceof \thebuggenie\core\helpers\MentionableProvider) {
foreach ($target->getMentionableUsers() as $user) {
if ($user->isOpenIdLocked()) {
continue;
}
$mentionables[$user->getID()] = array('username' => $user->getUsername(), 'name' => $user->getName(), 'image' => $user->getAvatarURL());
}
}
foreach ($this->getUser()->getFriends() as $user) {
if ($user->isOpenIdLocked()) {
continue;
}
$mentionables[$user->getID()] = array('username' => $user->getUsername(), 'name' => $user->getName(), 'image' => $user->getAvatarURL());
}
foreach ($this->getUser()->getTeams() as $team) {
foreach ($team->getMembers() as $user) {
if ($user->isOpenIdLocked()) {
continue;
}
$mentionables[$user->getID()] = array('username' => $user->getUsername(), 'name' => $user->getName(), 'image' => $user->getAvatarURL());
}
}
foreach ($this->getUser()->getClients() as $client) {
foreach ($client->getMembers() as $user) {
if ($user->isOpenIdLocked()) {
continue;
}
$mentionables[$user->getID()] = array('username' => $user->getUsername(), 'name' => $user->getName(), 'image' => $user->getAvatarURL());
}
}
$data['mentionables'] = array_values($mentionables);
break;
default:
$data['unread_notifications_count'] = $this->getUser()->getNumberOfUnreadNotifications();
$data['unread_notifications'] = array();
foreach ($this->getUser()->getUnreadNotifications() as $unread_notification) {
$data['unread_notifications'][] = $unread_notification->getID();
}
$data['poll_interval'] = framework\Settings::getNotificationPollInterval();
}
}
return $this->renderJSON($data);
}
}