private function getValueFromArray($array, $key) { if (!array_key_exists($key, $array)) { $message = sprintf('Cannot select the key %s from the given array', $this->reference); throw new ComponentException($message); } return $array[$key]; }