# \nre\responsesWebResponse

Representation of a web-response.

## Summary

Methods
Properties
Constants
addParam()
addParams()
clearParams()
getParam()
getParams()
setOutput()
getOutput()
setExit()
getExit()
addGetParam()
addGetParams()
getGetParam()
getGetParams()
addHeader()
clearHeaders()
header()
No public properties found
No constants found
No protected methods found
$params
N/A
newHeader()
$output
$exit
$getParams
$headers
N/A

File
  responses/WebResponse.inc
Package
  Default
Class hierarchy
  \nre\core\Response
  \nre\responses\WebResponse

## Tags

author | coderkun olli@coderkun.de

## Properties

### $params

    $params : array

Applied parameters

#### Type

array

#

Inherited from
  \nre\core\Response

## Tags

None found

### $output

    $output : string

Generated output

#### Type

string

#

Inherited from
  \nre\core\Response

## Tags

None found

### $exit

    $exit : boolean

Abort futher execution

#### Type

boolean

#

Inherited from
  \nre\core\Response

## Tags

None found

### $getParams

    $getParams : array

Applied GET-parameters

#### Type

array

#

## Tags

None found

### $headers

    $headers : array

Changed header lines

#### Type

array

#

## Tags

None found

## Methods

### addParam()

    addParam(mixed  $value)

Add a parameter.

#### Parameters

mixed | $value | Value of parameter

#

## Tags

None found

### addParams()

    addParams(mixed  $value1)

Add multiple parameters.

#### Parameters

mixed | $value1 | Value of first parameter

#

## Tags

None found

### clearParams()

    clearParams(integer  $offset)

Delete all stored parameters (from offset on).

#### Parameters

integer | $offset | Offset-index

#

## Tags

None found

### getParam()

    getParam(integer  $index, string  $defaultIndex = null) : string

Get a parameter.

#### Parameters

integer | $index | Index of parameter
string | $defaultIndex | Index of default configuration value for this parameter

#### Returns

string —

Value of parameter

#

## Tags

None found

### getParams()

    getParams(integer  $offset) : array

Get all parameters from index on.

#### Parameters

integer | $offset | Offset-index

#### Returns

array —

Parameter values

#

## Tags

None found

### setOutput()

    setOutput(string  $output)

Set output.

#### Parameters

string | $output | Generated output

#

Inherited from
  \nre\core\Response

## Tags

None found

### getOutput()

    getOutput() : string

Get generated output.

#### Returns

string —

Generated output

#

Inherited from
  \nre\core\Response

## Tags

None found

### setExit()

    setExit(boolean  $exit = true)

Set exit-state.

#### Parameters

boolean | $exit | Abort further execution

#

Inherited from
  \nre\core\Response

## Tags

None found

### getExit()

    getExit() : boolean

Get exit-state.

#### Returns

boolean —

Abort further execution

#

Inherited from
  \nre\core\Response

## Tags

None found

### addGetParam()

    addGetParam(string  $key, mixed  $value)

Add a GET-parameter.

#### Parameters

string | $key | Key of GET-parameter
mixed | $value | Value of GET-parameter

#

## Tags

None found

### addGetParams()

    addGetParams(array  $params)

Add multiple GET-parameters.

#### Parameters

array | $params | Associative arary with key-value GET-parameters

#

## Tags

None found

### getGetParam()

    getGetParam(  $key, string  $defaultIndex = null) : string

Get a GET-parameter.

#### Parameters

| $key |
string | $defaultIndex | Index of default configuration value for this parameter

#### Returns

string —

Value of GET-parameter

#

## Tags

None found

### getGetParams()

    getGetParams() : array

Get all GET-parameters.

#### Returns

array —

All GET-parameters

#

## Tags

None found

### addHeader()

    addHeader(string  $headerLine, boolean  $replace = true, integer  $http_response_code = null)

Add a line to the response header.

#### Parameters

string | $headerLine | Header line
boolean | $replace | Replace existing header line
integer | $http_response_code | HTTP-response code

#

## Tags

None found

### clearHeaders()

    clearHeaders()

Clear all stored headers.

#

## Tags

None found

### header()

    header()

Send stored headers.

#

## Tags

None found

### newHeader()

    newHeader(string  $headerLine, boolean  $replace = true, integer  $http_response_code = null)

Create a new header line.

#### Parameters

string | $headerLine | Header line
boolean | $replace | Replace existing header line
integer | $http_response_code | HTTP-response code

#

## Tags

None found

### WebResponse.inc