Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a generic data response #11821

Merged
merged 1 commit into from Oct 30, 2014

Conversation

Projects
None yet
5 participants
@BernhardPosselt
Copy link
Contributor

commented Oct 28, 2014

See #11812

@BernhardPosselt

This comment has been minimized.

Copy link
Contributor Author

commented Oct 28, 2014

@MorrisJobke

View changes

lib/public/appframework/http/dataresponse.php Outdated
* ownCloud - App Framework
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt <dev@bernhard-posselt.com>

This comment has been minimized.

Copy link
@MorrisJobke

MorrisJobke Oct 28, 2014

Member

I guess it's 2014 ;)

@BernhardPosselt BernhardPosselt force-pushed the generic-response branch 3 times, most recently Oct 28, 2014

@LukasReschke

View changes

lib/public/appframework/http/dataresponse.php Outdated
return $this;
}


This comment has been minimized.

@LukasReschke

View changes

lib/public/appframework/http/response.php Outdated
@@ -107,6 +107,16 @@ public function addHeader($name, $value) {


/**
* Set the headers
* @param array key value header pairs
* @return array the headers

This comment has been minimized.

Copy link
@LukasReschke

LukasReschke Oct 28, 2014

Member

Does not return anything?

@DeepDiver1975

View changes

lib/public/appframework/http/dataresponse.php Outdated
* @param array|object $data the object or array that should be transformed
* @param int $statusCode the Http status code, defaults to 200
*/
public function __construct($data=array(), $statusCode=Http::STATUS_OK) {

This comment has been minimized.

Copy link
@DeepDiver1975

DeepDiver1975 Oct 29, 2014

Member

I'd like to see a third argument where an array of headers can be passed in - thx

@BernhardPosselt BernhardPosselt force-pushed the generic-response branch Oct 29, 2014

add dataresponse
fix docstrings

adjust copyright date

another copyright date update

another header update

implement third headers argument, fix indention, fix docstrings

fix docstrings

@BernhardPosselt BernhardPosselt force-pushed the generic-response branch to 0696099 Oct 29, 2014

@scrutinizer-notifier

This comment has been minimized.

Copy link

commented Oct 29, 2014

The inspection completed: 10 new issues, 17 updated code elements

@ghost

This comment has been minimized.

Copy link

commented Oct 29, 2014

🚀 Test PASSed. 🚀
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/1477/
🚀 Test PASSed. 🚀

@LukasReschke

This comment has been minimized.

Copy link
Member

commented Oct 30, 2014

👍

1 similar comment
@MorrisJobke

This comment has been minimized.

Copy link
Member

commented Oct 30, 2014

👍

MorrisJobke added a commit that referenced this pull request Oct 30, 2014

@MorrisJobke MorrisJobke merged commit e2001c6 into master Oct 30, 2014

1 check passed

default Merged build finished.
Details

@MorrisJobke MorrisJobke deleted the generic-response branch Oct 30, 2014

@BernhardPosselt

This comment has been minimized.

Copy link
Contributor Author

commented Oct 30, 2014

Docs pushed to this PR owncloud/documentation#501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.