本文整理匯總了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);
?>