Add @return PHPDocs

This commit is contained in:
Thomas Tanghus 2014-03-10 09:31:30 +01:00
parent 8f6ea900f2
commit a1aacc18df
3 changed files with 7 additions and 0 deletions

View File

@ -66,6 +66,7 @@ class JSONResponse extends Response {
* Sets values in the data json array
* @param array|object $data an array or object which will be transformed
* to JSON
* @return JSONResponse Reference to this object
*/
public function setData($data){
$this->data = $data;

View File

@ -89,6 +89,7 @@ class Response {
* function
* @param string $name The name of the HTTP header
* @param string $value The value, null will delete it
* @return Response Reference to this object
*/
public function addHeader($name, $value) {
if(is_null($value)) {
@ -133,6 +134,7 @@ class Response {
/**
* Set response status
* @param int $status a HTTP status code, see also the STATUS constants
* @return Response Reference to this object
*/
public function setStatus($status) {
$this->status = $status;
@ -170,6 +172,7 @@ class Response {
/**
* Set the ETag
* @param string $ETag
* @return Response Reference to this object
*/
public function setETag($ETag) {
$this->ETag = $ETag;
@ -181,6 +184,7 @@ class Response {
/**
* Set "last modified" date
* @param \DateTime $lastModified
* @return Response Reference to this object
*/
public function setLastModified($lastModified) {
$this->lastModified = $lastModified;

View File

@ -74,6 +74,7 @@ class TemplateResponse extends Response {
* Sets template parameters
* @param array $params an array with key => value structure which sets template
* variables
* @return TemplateResponse Reference to this object
*/
public function setParams(array $params){
$this->params = $params;
@ -106,6 +107,7 @@ class TemplateResponse extends Response {
* settings header and footer, user renders the normal
* normal page including footer and header and blank
* just renders the plain template
* @return TemplateResponse Reference to this object
*/
public function renderAs($renderAs){
$this->renderAs = $renderAs;