本文整理汇总了PHP中Character::updateCharacterSkills方法的典型用法代码示例。如果您正苦于以下问题:PHP Character::updateCharacterSkills方法的具体用法?PHP Character::updateCharacterSkills怎么用?PHP Character::updateCharacterSkills使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character
的用法示例。
在下文中一共展示了Character::updateCharacterSkills方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: refreshAPIKey
public function refreshAPIKey($type)
{
global $settings;
if ($this->keyStatus == 1 and $this->accessMask == MINIMUM_API and $this->expires == 'No Expiration' and $this->keyType == 'Account') {
$update = $this->updateAPIKey();
if ($update) {
if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications() and $type == 'new') {
sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'New API Key submitted by ' . User::fetchUserName($this->uid) . '.', 'aura', 'chat.postMessage');
}
$character_array = array();
foreach ($this->getCharacters() as $character) {
$character_array[$character['characterID']] = $character['characterID'];
$char = new Character($character['characterID'], $this->keyID, $this->vcode, $this->accessMask, $this->db, $this->uid);
if ($char->getExistance() or $char->getExistance() == FALSE) {
$char->updateCharacterInfo();
$char->updateCharacterSkills();
}
}
$stmt = $this->db->prepare('UPDATE core_cron SET cron_updated = 1 WHERE api_keyID = ?');
$stmt->execute(array($this->keyID));
$this->removeOrphanedCharacter($this->keyID, $this->uid, $character_array);
return TRUE;
}
} elseif ($this->keyStatus != 1 and $type == 'new') {
if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications()) {
sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'API Key submitted by ' . User::fetchUserName($this->uid) . ' has been rejected as it is invalid.', 'aura', 'chat.postMessage');
}
setAlert('danger', 'The API Key Is Invalid', 'The API Key provided is invalid and cannot be used. Please create a new API key, and ensure you have copied the keyID and verification code correctly.');
} elseif (!($this->accessMask == MINIMUM_API) and $this->getKeyStatus() == 1 and $type == "new") {
if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications()) {
sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'API Key submitted by ' . User::fetchUserName($this->uid) . ' has been rejected due to an incorrect access mask.', 'aura', 'chat.postMessage');
}
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 ($this->expires != 'No Expiration' and $type == "new") {
if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications()) {
sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'API Key submitted by ' . User::fetchUserName($this->uid) . ' has been rejected because it has an expiration.', 'aura', 'chat.postMessage');
}
setAlert('danger', 'The API Key Expires', 'The provided API Key has an expiration set. Please create a new key using the Create Key link and ensure you select the No Expiration checkbox.');
} elseif ($this->keyType != 'Account' and $type == "new") {
if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications()) {
sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'API Key submitted by ' . User::fetchUserName($this->uid) . ' has been rejected because it is a single character key.', 'aura', 'chat.postMessage');
}
setAlert('danger', 'The API Key Provided is Single-Character', 'All API Keys must be account-wide. Please create a new key using the Create Key link, and do not change the key from an Account Key to a Single Character key.');
}
}
示例2: ApiKey
$key = new ApiKey($apiLookup['api_keyID'], $apiLookup['api_vCode'], $apiLookup['uid'], $db);
// Checking to see if the key is valid
if ($key->getKeyStatus() == 1) {
// Key is valid, updating it
$updateKey = $key->updateAPIKey();
// Checking the access mask for the key
if ($key->accessMaskCheck()) {
// Looping through the characters
foreach ($key->getCharacters() as $character) {
$char = new Character($character['characterID'], $key->getKeyID(), $key->getVCode(), $key->getAccessMask(), $db, $apiLookup['uid']);
if ($char->getExistance() or $char->getExistance() == FALSE) {
$char->updateCharacterInfo();
/*
* SKILLS UPDATE SECTION
*/
$skills = $char->updateCharacterSkills();
// Checking for skills update success
if ($skills === "SDE Failure") {
echo date('Ymd H:i:s', time()) . " - cron_update.php - FAILURE - Skill detected that does not exist in SDE for charid " . $character['characterID'] . "\n";
} elseif ($skills === FALSE) {
echo date('Ymd H:i:s', time()) . " - cron_update.php - FAILURE - General processing error for charid " . $character['characterID'] . "\n";
}
/*
* SKILLPLAN UPDATE SECTION
*/
$skillPlans = $char->updateSkillPlanProgress();
/*
* DOCTRINE COMPLIANCE SECTION
*/
Fitting::getDoctrineCompliance($character['characterID']);
/*