Stud.IP  6.0
StudipResponse Class Reference
Inheritance diagram for StudipResponse:
Response

Public Member Functions

 __construct (protected Psr\Http\Message\ResponseInterface $psr_response)
 
 __call ($name, $value)
 
 getPsrResponse ()
 
 output ()
 
 set_body ($body)
 
 set_status ($status, $reason=null)
 
 add_header ($key, $value)
 
- Public Member Functions inherited from Response
 __construct (string $body='', array $headers=[], ?int $status=null, ?string $reason=null)
 
 set_body ($body)
 
 set_status ($status, $reason=null)
 
 add_header ($key, $value)
 
 output ()
 
 send_header ($header, $replace=false, $status=null)
 

Additional Inherited Members

- Static Public Member Functions inherited from Response
static get_reason ($status)
 
- Data Fields inherited from Response
 $body = ''
 
 $status
 
 $reason
 
 $headers = []
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( protected Psr\Http\Message\ResponseInterface  $psr_response)

Constructor.

Returns
void

Member Function Documentation

◆ __call()

__call (   $name,
  $value 
)
Parameters
$name
$value
Returns
mixed

◆ add_header()

add_header (   $key,
  $value 
)

Adds an additional header to the response.

Parameters
stringthe left hand key part
stringthe right hand value part
Returns
static this response object. Useful for cascading method calls.

◆ getPsrResponse()

getPsrResponse ( )
Returns

◆ output()

output ( )
Returns
void

◆ set_body()

set_body (   $body)

Sets the body of the response.

Parameters
string | Psr\Http\Message\StreamInterface$bodythe body
Returns
static this response object. Useful for cascading method calls.

◆ set_status()

set_status (   $status,
  $reason = null 
)

Sets the status code and an optional custom reason. If none is given, the standard reason phrase as of RFC 2616 is used.

Parameters
integerthe status code
stringthe custom reason, defaulting to the one given in RFC 2616
Returns
static this response object. Useful for cascading method calls.

The documentation for this class was generated from the following file: