本文整理汇总了PHP中Info::class_text方法的典型用法代码示例。如果您正苦于以下问题:PHP Info::class_text方法的具体用法?PHP Info::class_text怎么用?PHP Info::class_text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Info
的用法示例。
在下文中一共展示了Info::class_text方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
public function actionIndex()
{
if (Yii::app()->user->isGuest) {
$this->redirect(Yii::app()->homeUrl);
}
$this->pageTitle = Yii::t('title', 'Userbar creation');
$image = null;
$model = new UserbarForm();
if (isset($_POST['UserbarForm'])) {
$model->attributes = $_POST['UserbarForm'];
if ($model->validate()) {
$criteria = new CDbCriteria();
$criteria->select = 'id, name, exp, gender, race, player_class';
$player = Players::model()->with('abyssRank', 'lifeStats')->findByPK($model->player_id);
$criteria = new CDbCriteria();
$criteria->select = 'name';
$legion = Legions::model()->with(array('legionMembers' => array('joinType' => 'INNER JOIN', 'condition' => 'player_id = ' . $model->player_id)))->find();
if ($legion == NULL) {
$legion->name = null;
}
Yii::app()->ih->load($_SERVER['DOCUMENT_ROOT'] . Yii::app()->baseUrl . '/images/userbars/ub' . $model->fon . '.png')->text($player->name, Yii::app()->basePath . '/fonts/romic.ttf', 14, $this->rgb($model->shadow), CImageHandler::CORNER_LEFT_TOP, 8, 8)->text($player->name, Yii::app()->basePath . '/fonts/romic.ttf', 14, $this->rgb($model->name), CImageHandler::CORNER_LEFT_TOP, 8, 7)->text($legion->name, Yii::app()->basePath . '/fonts/monaco.ttf', 10, $this->rgb($model->shadow), CImageHandler::CORNER_LEFT_TOP, 8, 36)->text($legion->name, Yii::app()->basePath . '/fonts/monaco.ttf', 10, $this->rgb($model->legion), CImageHandler::CORNER_LEFT_TOP, 8, 35)->text(Info::class_text($player->player_class) . ', ' . $this->genderRace($player->gender, $player->race), Yii::app()->basePath . '/fonts/verdana.ttf', 8, $this->rgb($model->shadow), CImageHandler::CORNER_LEFT_BOTTOM, 8, 9)->text(Info::class_text($player->player_class) . ', ' . $this->genderRace($player->gender, $player->race), Yii::app()->basePath . '/fonts/verdana.ttf', 8, $this->rgb($model->class_race), CImageHandler::CORNER_LEFT_BOTTOM, 8, 10)->text(Info::lvl($player->exp) . ' Level', Yii::app()->basePath . '/fonts/romic.ttf', 14, $this->rgb($model->shadow), CImageHandler::CORNER_RIGHT_TOP, 8, 6)->text(Info::lvl($player->exp) . ' Level', Yii::app()->basePath . '/fonts/romic.ttf', 14, $this->rgb($model->level), CImageHandler::CORNER_RIGHT_TOP, 8, 5)->text($player->abyssRank->all_kill . '/' . $player->abyssRank->weekly_kill . ' Kills', Yii::app()->basePath . '/fonts/monaco.ttf', 10, $this->rgb($model->shadow), CImageHandler::CORNER_RIGHT_TOP, 8, 34)->text($player->abyssRank->all_kill . '/' . $player->abyssRank->weekly_kill . ' Kills', Yii::app()->basePath . '/fonts/monaco.ttf', 10, $this->rgb($model->kills), CImageHandler::CORNER_RIGHT_TOP, 8, 33)->text($player->lifeStats->hp . ' HP, ' . $player->lifeStats->mp . ' MP', Yii::app()->basePath . '/fonts/verdana.ttf', 8, $this->rgb($model->shadow), CImageHandler::CORNER_RIGHT_BOTTOM, 8, 9)->text($player->lifeStats->hp . ' HP, ' . $player->lifeStats->mp . ' MP', Yii::app()->basePath . '/fonts/verdana.ttf', 8, $this->rgb($model->stats), CImageHandler::CORNER_RIGHT_BOTTOM, 8, 10)->save($_SERVER['DOCUMENT_ROOT'] . Yii::app()->baseUrl . '/userbars/' . $model->player_id . '.png');
$image = Yii::app()->homeUrl . 'userbars/' . $model->player_id . '.png';
}
}
$this->render('/userbar', array('model' => $model, 'players' => Players::getPlayers(), 'image' => $image));
}
示例2: number_format
echo Info::player_class($player->player_class);
?>
</td>
<td width="206px"><span class="player_name"><?php
echo $player->name;
?>
</span></td>
<td width="206px"></td>
<td width="206px" align="right"><span class="player_name"><?php
echo Info::lvl($player->exp);
?>
уровень</span></td>
</tr>
<tr>
<td colspan="2"><span>Класс:</span> <?php
echo Info::class_text($player->player_class);
?>
</td>
<td><span>AP:</span> <?php
echo number_format($player['abyssRank']['ap'], 0, ' ', ' ');
?>
</td>
<td>HP: <?php
echo $player->lifeStat->hp;
?>
</td>
</tr>
<tr>
<td colspan="2"><span>Раса:</span> <?php
echo Info::race_text($player->race);
?>