本文整理汇总了PHP中site::setting方法的典型用法代码示例。如果您正苦于以下问题:PHP site::setting方法的具体用法?PHP site::setting怎么用?PHP site::setting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类site
的用法示例。
在下文中一共展示了site::setting方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_member_list
private function get_member_list()
{
// Call site settings for stored roster & member ranks to track
$siteSettings = site::setting();
// Decode JSON from stored roster data
$roster = json_decode($siteSettings[0]['fullRoster'], true);
$data = array();
// Decode JSON from stored roster ranks
$ranks = json_decode($siteSettings[0]['rosterRanks'], true);
$filterRanks = array();
// Ranks to track
foreach ($ranks as $key => $value) {
try {
// echo $key . ' == ' . $value['track'] . '<br/>';
if ($value['track']) {
$filterRanks[] = $key;
}
} catch (Exception $e) {
//
}
}
foreach ($roster['members'] as $key => $character) {
// echo var_dump($character['character']);
// echo $character['character']['name'];
if (in_array($character['rank'], $filterRanks)) {
$data[] = $character['character']['name'];
}
}
json::resp(array('success' => true, 'data' => $data));
}
示例2:
<?php
require 'inc/config/backbone.php';
$siteSettings = site::setting();
?>
<!DOCTYPE html>
<html>
<head>
<title><?php
echo guild_name . ' ' . guild_server . ' ' . guild_faction;
?>
</title>
<meta name="keywords" content="<?php
echo guild_name;
?>
, <?php
echo guild_server;
?>
, <?php
echo guild_faction;
?>
, Guild Site, Guild, WoW, Official Guild Site" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="<?php
echo site_url;
?>
css/stylesheet.css"/>