public function removeApiKey($sKey) { $iIndex = array_search($sKey, $this->aApiKeys); if ($iIndex === false) { throw new \OutOfRangeException('This API key does not exist in list.'); } else { unset($this->aApiKeys[$iIndex]); } return $this; }