Method | Description | |
---|---|---|
__construct ( integer $statusCode ) | Create a new Response | |
addBody ( raml\BodyInterface $body ) | Add a new body | |
addHeader ( raml\NamedParameter $header ) | Add a new header | |
createFromArray ( string $statusCode, array $data = [] ) : |
Create a new response object from an array | |
getBodies ( ) : raml\BodyInterface[] | Returns the list of bodies for this response type. | |
getBodyByType ( string $type ) : raml\BodyInterface | Get the body by type | |
getDescription ( ) : string | Returns the description | |
getHeaders ( ) : raml\NamedParameter[] | Returns the headers | |
getStatusCode ( ) : integer | Returns the status code | |
getTypes ( ) : array | Returns all supported types in response | |
setDescription ( string $description ) | Set the description |
public __construct ( integer $statusCode ) | ||
$statusCode | integer |
public addBody ( raml\BodyInterface $body ) | ||
$body | raml\BodyInterface |
public addHeader ( raml\NamedParameter $header ) | ||
$header | raml\NamedParameter |
public static createFromArray ( string $statusCode, array $data = [] ) : |
||
$statusCode | string | |
$data | array | |
return |
public getBodies ( ) : raml\BodyInterface[] | ||
return | raml\BodyInterface[] |
public getBodyByType ( string $type ) : raml\BodyInterface | ||
$type | string | |
return | raml\BodyInterface |
public getDescription ( ) : string | ||
return | string |
public getHeaders ( ) : raml\NamedParameter[] | ||
return | raml\NamedParameter[] |
public getStatusCode ( ) : integer | ||
return | integer |
public setDescription ( string $description ) | ||
$description | string |