PHP Class Teapot\HttpException

Author: Barney Hanlon ([email protected])
Inheritance: extends teapot\Exception, implements teapot\StatusCode
Show file Open project: shrikeh/teapot

Public Methods

Method Description
__toString ( ) : string Simple magic so you can use the Exception directly as a string, for example in header();.
render ( boolean $prependHttp = true ) : string Render the code and message (in whole or in part) as a valid response status header.

Method Details

__toString() public method

Simple magic so you can use the Exception directly as a string, for example in header();.
public __toString ( ) : string
return string A fully valid status header

render() public method

Render the code and message (in whole or in part) as a valid response status header.
public render ( boolean $prependHttp = true ) : string
$prependHttp boolean Whether to prepend the HTTP/1.1 prefix
return string