public function updateCorporationKey(ApiCredentials $key, Element $result) { $result_key = $result->toArray(); $character = array_pop($result_key['characters']); $key->setEveCharacterId($character['characterID'])->setType($result_key['type'])->setAccessMask($result_key['accessMask'])->setEveCorporationId($character['corporationID']); return $key; }
/** * returns the Object as associated array * @return array */ public function toArray() { if ($this->rootElement instanceof CanConvertToArray) { return array('currentTime' => $this->request_time, 'cachedUntil' => $this->cached_until, 'result' => $this->rootElement->toArray()); } else { return array(); } }