/** * Value for key * @param string $key * @return string * @throws \RuntimeException */ protected function value($key) { if ($key == self::ACCOUNTID) { if (is_null($this->AccountID)) { throw new \RuntimeException('Account id must be set.'); } return $this->AccountID; } return parent::value($key); }