protected static function requireValue($data, $key)
    {
        if (isset($data[$key])) {
            return $data[$key];
        } else {
            throw new Exception\InvalidDataException("Required value for '$key' is missing");
        }
    }