本文整理汇总了PHP中Character::deleteCharacter方法的典型用法代码示例。如果您正苦于以下问题:PHP Character::deleteCharacter方法的具体用法?PHP Character::deleteCharacter怎么用?PHP Character::deleteCharacter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character
的用法示例。
在下文中一共展示了Character::deleteCharacter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeOrphanedCharacter
private function removeOrphanedCharacter($keyID, $uid, $character_array)
{
$stmt = $this->_db->prepare('SELECT character_id FROM user_characters WHERE userid = ? AND key_keyid = ?');
$stmt->execute(array($uid, $keyID));
$characters = $stmt->fetchAll(\PDO::FETCH_ASSOC);
foreach ($characters as $character) {
unset($character_array[$character['character_id']]);
}
if (!empty($character_array)) {
foreach ($character_array as $delete_character) {
Character::deleteCharacter($delete_character, $uid, $this->_db);
}
}
}
示例2: array
$stmt->execute(array($user->getUID(), $keyID));
$characters = $stmt->fetchAll(PDO::FETCH_ASSOC);
$character_array = array();
foreach ($characters as $character) {
$character_array[$character['charid']] = $character['charid'];
}
foreach ($key->getCharacters() as $character) {
$char = new Character($character['characterID'], $key->getKeyID(), $key->getVCode(), $key->getAccessMask(), $db, $user);
if ($char->getExistance() or $char->getExistance() == FALSE) {
$char->updateCharacterInfo();
}
unset($character_array[$char->getCharacterID()]);
}
if (!empty($character_array)) {
foreach ($character_array as $delete_character) {
Character::deleteCharacter($delete_character, $user->getUID());
}
}
$refresh = $key->refreshAPIKey('refresh');
setAlert('success', 'API Key Refreshed', 'The API key has been successfully refreshed.');
}
} elseif (!($key->getAccessMask() & MINIMUM_API) and $key->getKeyStatus() == 1) {
setAlert('danger', 'The API Key Does Not Meet Minimum Requirements', 'The required minimum Access Mask for API keys is ' . MINIMUM_API . '. Please create a new key using the Create Key link.');
}
} elseif ($request['value'] == 'delete') {
}
if ($user->getAdminAccess()) {
$stmt = $db->prepare('SELECT * FROM user_apikeys JOIN user_accounts ON user_apikeys.uid = user_accounts.uid ORDER BY user_accounts.username ASC');
$stmt->execute(array());
$keys = $stmt->fetchAll(PDO::FETCH_ASSOC);
} else {