Skip to content


Subversion checkout URL

You can clone with
Download ZIP


_get/_set for headers (etc) & ArrayAccess #56

BigBlueHat opened this Issue · 1 comment

2 participants


It would be super rad to not have to care about underlying changes to header case (as in 0.8.0) using "magic methods" like _get & _set:

It would be doubly super rad to not have to care about JSON decoding "style" (array or object)--especially since it's "Sag-wide" atm:


(this last one is something I wish PHP "just did" but in the meantime, if Sag does it automatically, it'd be very helpful).

Mostly just trying to lower the "usability" bar. :)


To your points...

  • Yeah, header case was silly. I wouldn't have done it if Cloudant didn't send different cases. Luckily we don't have to build anything else for this because we just lower case the strings, meaning it will Never Change Again.

  • If we were building around this issue, I'd rather not create a SagResponse class. It's one of my pet peeves about other libs.

  • The decoding stuff just tells Sag whether to run json_decode() on response bodies. There are no implementation details in Sag, just in PHP. I'd rather not break how json_decode() "works".

Plus all the things I just said in IRC. :)


@sbisbee sbisbee closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.