本文整理汇总了PHP中app\models\Setting::getNickName方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getNickName方法的具体用法?PHP Setting::getNickName怎么用?PHP Setting::getNickName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Setting
的用法示例。
在下文中一共展示了Setting::getNickName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
public function actionIndex()
{
$setting = new Setting();
$data['siteName'] = $setting->getSiteName()->value;
$data['address'] = $setting->getAddress()->value;
$data['nickName'] = $setting->getNickName()->value;
$data['desc'] = $setting->getDesc()->value;
return $this->render('index', ['info' => $data]);
}
示例2: Article
<div style="width: 70%;float: left;min-height: 10px;">
<?php
echo $content;
?>
</div>
<div style="width:30%;float: left;padding-left: 20px;">
<div class="part">
<div class="part_head">关于</div>
<div class="contain">
<div class="avater_center">
<div id="avater">
<img src="/img/avater.jpg">
</div>
</div>
<p class="my_desc"><?php
echo $setting->getNickName()->value;
?>
</p>
<p class="my_desc"><?php
echo $setting->getDesc()->value;
?>
</p>
</div>
</div>
<div class="part">
<div class="part_head">最热文章</div>
<div class="contain">
<?php
$article = new Article();
$hots = $article->getHot();
foreach ($hots as $hot) {