本文整理汇总了PHP中Rank::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Rank::create方法的具体用法?PHP Rank::create怎么用?PHP Rank::create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rank
的用法示例。
在下文中一共展示了Rank::create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unlink
if (file_exists(DB_NAME)) {
unlink(DB_NAME);
}
//Instanciation des managers d'entités
$user = new User();
$configuration = new Configuration();
$right = new Right();
$rank = new Rank();
$section = new Section();
$event = new Event();
$client = new Client();
//Création des tables SQL
$configuration->create();
$user->create();
$right->create();
$rank->create();
$section->create();
$event->create();
$client->create();
$configuration->put('UPDATE_URL', 'http://update.idleman.fr/yana?callback=?');
$configuration->put('DEFAULT_THEME', 'default');
$configuration->put('COOKIE_NAME', 'yana');
$configuration->put('COOKIE_LIFETIME', '7');
$configuration->put('VOCAL_ENTITY_NAME', 'YANA');
$configuration->put('PROGRAM_VERSION', '3.0.6');
$configuration->put('HOME_PAGE', 'index.php');
$configuration->put('VOCAL_SENSITIVITY', '0.0');
//Création du rang admin
$rank = new Rank();
$rank->setLabel('admin');
$rank->save();
示例2: run
public function run()
{
DB::table('ranks')->delete();
Rank::create(array('caca' => 1, 'corazon' => 0, 'idPerfil' => 1, 'idAlias' => 1));
Rank::create(array('caca' => 0, 'corazon' => 1, 'idPerfil' => 1, 'idAlias' => 1));
}
示例3: extract
</tr>
<tr>
<td colspan="2">
<button id="create" name="create" class="btn btn-primary" type="button" onclick="createRank()">Create</button>
</td>
</tr>
</table>
</form>
<div id="loading" class="alert alert-info" role="alert" style="display: none">
</div>
<?php
} else {
if ($do == 'create') {
extract($_POST);
Rank::create($name, $division, $abbrev, $paygrade);
Event::addEvent('Rank ' . $name . ' has been created.', $_SESSION['user'], 1);
}
}
} else {
if ($action == 'delete') {
if ($do == 'none') {
?>
<a onclick="load('ranks', 'delete', 'delete', {id: '<?php
echo $_GET['id'];
?>
'})">Continue?</a> (<b>NOTE:</b> This action cannot be reversed!)
<?php
} else {
if ($do == 'delete') {
$ranks = new Rank($_GET['id']);